€•°LŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ#/translations/zh_CN/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/zh_TW/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/it_IT/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ja_JP/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ko_KR/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/pt_BR/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/sp_SP/tools/jobserver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ=/var/lib/git/docbuild/linux/Documentation/tools/jobserver.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒJob server module”h]”hŒJob server module”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒindex”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(Œpair”Œmodule; lib.python.jobserver”Œmodule-lib.python.jobserver”hNt”auh1hÝhhÊh²hh³Nh´NubhŒ paragraph”“”)”}”(hŒ@Interacts with the POSIX jobserver during the Kernel build time.”h]”hŒ@Interacts with the POSIX jobserver during the Kernel build time.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œl/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver”h´KhhÊh²hubhï)”}”(hŒPA "normal" jobserver task, like the one initiated by a make subprocess would do:”h]”hŒTA “normal†jobserver task, like the one initiated by a make subprocess would do:”…””}”(hhÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hþh´KhhÊh²hubhŒ block_quote”“”)”}”(hŒß- open read/write file descriptors to communicate with the job server; - ask for one slot by calling:: claim = os.read(reader, 1) - when the job finishes, call:: os.write(writer, b"+") # os.write(writer, claim) ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒDopen read/write file descriptors to communicate with the job server;”h]”hï)”}”(hjh]”hŒDopen read/write file descriptors to communicate with the job server;”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hþh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒ, >]”h]”(hŒclass”…””}”(hj7h²hh³Nh´NubhŒdesc_sig_space”“”)”}”(hŒ ”h]”hŒ ”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”Œw”ah"]”h$]”h&]”uh1j?hj7ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j5hj1h²hh³Œz/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec”h´KubhŒ desc_addname”“”)”}”(hŒlib.python.jobserver.”h]”hŒlib.python.jobserver.”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”(Œ sig-prename”Œ descclassname”eh"]”h$]”h&]”hÅhÆuh1jWhj1h²hh³jVh´KubhŒ desc_name”“”)”}”(hŒ JobserverExec”h]”hŒ JobserverExec”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”hÅhÆuh1jihj1h²hh³jVh´Kubeh}”(h]”j(ah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œmodule”Œlib.python.jobserver”Œclass”hŒfullname”jmŒ _toc_parts”j„jm†”Œ _toc_name”jmuh1j/h³jVh´Khj,h²hubhŒ desc_content”“”)”}”(hhh]”(hï)”}”(hŒBases: :py:class:`object`”h]”(hŒBases: ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:py:class:`object`”h]”j–)”}”(hj™h]”hŒobject”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œpy”Œpy-class”eh"]”h$]”h&]”uh1j•hj—ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œtools/jobserver”Œ refdomain”j¦Œreftype”Œclass”Œ refexplicit”‰Œrefwarn”‰Œ py:module”j„Œpy:class”jmŒ reftarget”Œobject”uh1hh³Œl/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver”h´Khjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œz/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec”h´KhjŒh²hubhï)”}”(hŒ0Claim all slots from make using POSIX Jobserver.”h]”hŒ0Claim all slots from make using POSIX Jobserver.”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œz/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec”h´KhjŒh²hubhï)”}”(hŒThe main methods here are:”h]”hŒThe main methods here are:”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jÒh´KhjŒh²hubj)”}”(hhh]”(j)”}”(hŒopen(): reserves all slots;”h]”hï)”}”(hjæh]”hŒopen(): reserves all slots;”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jÒh´Khjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjáh²hh³jÒh´Nubj)”}”(hŒ4close(): method returns all used slots back to make;”h]”hï)”}”(hjýh]”hŒ4close(): method returns all used slots back to make;”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jÒh´Khjûubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjáh²hh³jÒh´Nubj)”}”(hŒKrun(): executes a command setting PARALLELISM=. ”h]”hï)”}”(hŒIrun(): executes a command setting PARALLELISM=.”h]”hŒIrun(): executes a command setting PARALLELISM=.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jÒh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjáh²hh³Œ€/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.close”h´Nubeh}”(h]”h ]”h"]”h$]”h&]”j…j†uh1jh³jÒh´KhjŒh²hubhÞ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j&Œ3close() (lib.python.jobserver.JobserverExec method)”Œ(lib.python.jobserver.JobserverExec.close”hNt”auh1hÝhjŒh²hh³Œ€/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.close”h´Nubj+)”}”(hhh]”(j0)”}”(hŒJobserverExec.close()”h]”(jj)”}”(hŒclose”h]”hŒclose”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”(jvjweh"]”h$]”h&]”hÅhÆuh1jihjCh²hh³Œ€/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.close”h´KubhŒdesc_parameterlist”“”)”}”(hŒ()”h]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jVhjCh²hh³jUh´Kubeh}”(h]”j=ah ]”(j~jeh"]”h$]”h&]”jƒŒlib.python.jobserver”j…jmj†ŒJobserverExec.close”j‡jhŒ JobserverExec”Œclose”‡”j‰ŒJobserverExec.close()”uh1j/h³jUh´Khj@h²hubj‹)”}”(hhh]”hï)”}”(hŒ'Return all reserved slots to Jobserver.”h]”hŒ'Return all reserved slots to Jobserver.”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j?h´Khjnh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠhj@h²hh³jUh´Kubeh}”(h]”h ]”(Œpy”Œmethod”eh"]”h$]”h&]”Œdomain”jˆŒobjtype”j‰Œdesctype”j‰Œnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1j*h²hhjŒh³j?h´NubhÞ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j&Œ2open() (lib.python.jobserver.JobserverExec method)”Œ'lib.python.jobserver.JobserverExec.open”hNt”auh1hÝhjŒh²hh³Œ/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.open”h´Nubj+)”}”(hhh]”(j0)”}”(hŒJobserverExec.open()”h]”(jj)”}”(hŒopen”h]”hŒopen”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”(jvjweh"]”h$]”h&]”hÅhÆuh1jihj¥h²hh³Œ/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.open”h´KubjW)”}”(hŒ()”h]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jVhj¥h²hh³j·h´Kubeh}”(h]”jŸah ]”(j~jeh"]”h$]”h&]”jƒŒlib.python.jobserver”j…jmj†ŒJobserverExec.open”j‡jÈŒ JobserverExec”Œopen”‡”j‰ŒJobserverExec.open()”uh1j/h³j·h´Khj¢h²hubj‹)”}”(hhh]”hï)”}”(hŒ3Reserve all available slots to be claimed later on.”h]”hŒ3Reserve all available slots to be claimed later on.”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j¡h´KhjÎh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠhj¢h²hh³j·h´Kubeh}”(h]”h ]”(Œpy”Œmethod”eh"]”h$]”h&]”jjèjŽjéjjéj‰j‘‰j’‰uh1j*h²hhjŒh³j¡h´NubhÞ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j&Œ1run() (lib.python.jobserver.JobserverExec method)”Œ&lib.python.jobserver.JobserverExec.run”hNt”auh1hÝhjŒh²hh³Œ~/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.run”h´Nubj+)”}”(hhh]”(j0)”}”(hŒ'JobserverExec.run(cmd, *args, **pwargs)”h]”(jj)”}”(hŒrun”h]”hŒrun”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jvjweh"]”h$]”h&]”hÅhÆuh1jihjÿh²hh³Œ~/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.JobserverExec.run”h´KubjW)”}”(hŒcmd, *args, **pwargs”h]”(hŒdesc_parameter”“”)”}”(hŒcmd”h]”hŒ desc_sig_name”“”)”}”(hŒcmd”h]”hŒcmd”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjubj)”}”(hŒ*args”h]”(hŒdesc_sig_operator”“”)”}”(hŒ*”h]”hŒ*”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”Œo”ah"]”h$]”h&]”uh1j7hj3ubj)”}”(hŒargs”h]”hŒargs”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”j)ah"]”h$]”h&]”uh1jhj3ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjubj)”}”(hŒ**pwargs”h]”(j8)”}”(hŒ**”h]”hŒ**”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”jDah"]”h$]”h&]”uh1j7hj\ubj)”}”(hŒpwargs”h]”hŒpwargs”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”j)ah"]”h$]”h&]”uh1jhj\ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jVhjÿh²hh³jh´Kubeh}”(h]”jùah ]”(j~jeh"]”h$]”h&]”jƒŒlib.python.jobserver”j…jmj†ŒJobserverExec.run”j‡jŽŒ JobserverExec”Œrun”‡”j‰ŒJobserverExec.run()”uh1j/h³jh´Khjüh²hubj‹)”}”(hhh]”hï)”}”(hŒÀRun a command setting PARALLELISM env variable to the number of available job slots (claim) + 1, e.g. it will reserve claim slots to do the actual build work, plus one to monitor its children.”h]”hŒÀRun a command setting PARALLELISM env variable to the number of available job slots (claim) + 1, e.g. it will reserve claim slots to do the actual build work, plus one to monitor its children.”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jûh´Khj”h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠhjüh²hh³jh´Kubeh}”(h]”h ]”(Œpy”Œmethod”eh"]”h$]”h&]”jj®jŽj¯jj¯j‰j‘‰j’‰uh1j*h²hhjŒh³jûh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jŠhj,h²hh³jVh´Kubeh}”(h]”h ]”(Œpy”Œclass”eh"]”h$]”h&]”jj¼jŽj½jj½j‰j‘‰j’‰uh1j*h²hhhÊh³Nh´NubhÞ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j&Œ'warn() (in module lib.python.jobserver)”Œlib.python.jobserver.warn”hNt”auh1hÝhhÊh²hh³Nh´Nubj+)”}”(hhh]”(j0)”}”(hŒwarn(text, *args)”h]”(jX)”}”(hŒlib.python.jobserver.”h]”hŒlib.python.jobserver.”…””}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”(jdjeeh"]”h$]”h&]”hÅhÆuh1jWhjÒh²hh³Œq/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver.warn”h´Kubjj)”}”(hŒwarn”h]”hŒwarn”…””}”(hjåh²hh³Nh´Nubah}”(h]”h ]”(jvjweh"]”h$]”h&]”hÅhÆuh1jihjÒh²hh³jäh´KubjW)”}”(hŒ text, *args”h]”(j)”}”(hŒtext”h]”j)”}”(hŒtext”h]”hŒtext”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”j)ah"]”h$]”h&]”uh1jhj÷ubah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjóubj)”}”(hŒ*args”h]”(j8)”}”(hŒ*”h]”hŒ*”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”jDah"]”h$]”h&]”uh1j7hjubj)”}”(hŒargs”h]”hŒargs”…””}”(hj!h²hh³Nh´Nubah}”(h]”h ]”j)ah"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjóubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jVhjÒh²hh³jäh´Kubeh}”(h]”jÍah ]”(j~jeh"]”h$]”h&]”jƒŒlib.python.jobserver”j…hj†jçj‡jAj熔j‰Œwarn()”uh1j/h³jäh´KhjÏh²hubj‹)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jŠhjÏh²hh³jäh´Kubeh}”(h]”h ]”(Œpy”Œfunction”eh"]”h$]”h&]”jjPjŽjQjjQj‰j‘‰j’‰uh1j*h²hhhÊh³Nh´Nubeh}”(h]”(hìŒjob-server-module”eh ]”h"]”Œjob server module”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j€Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”jZjWsŒ nametypes”}”jZ‰sh}”(jWhÊhìhŒtarget”“”)”}”(hhh]”h}”(h]”hìah ]”h"]”h$]”h&]”Œismod”ˆuh1jÇh³Œl/var/lib/git/docbuild/linux/Documentation/../tools/lib/python/jobserver.py:docstring of lib.python.jobserver”h´KhhÊh²hubj(j1j=jCjŸj¥jùjÿjÍjÒuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.