File "context.cpython-39.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/context.cpython-39.pyc
File size: 12.73 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

a

XC?h+@sddlZddlZddlZddlmZddlmZdZGdddeZGdd	d	eZ	Gd
ddeZ
Gdd
d
eZGdddeZ
GdddejZGddde
ZejdkrRGdddejZGdddejZGdddejZGddde
ZGddde
ZGdd d e
Zeeed!Zejd"krDeed#Zneed$Zn8Gd%ddejZGd&dde
Zd#eiZeed#Zd'd(ZeZd)d*Zd+d,Zd-d.ZdS)/N)process)	reductionc@seZdZdS)ProcessErrorN__name__
__module____qualname__rrr</opt/alt/python39/lib64/python3.9/multiprocessing/context.pyrsrc@seZdZdS)BufferTooShortNrrrrrrsrc@seZdZdS)TimeoutErrorNrrrrrr
sr
c@seZdZdS)AuthenticationErrorNrrrrrrsrc@sXeZdZeZeZeZeZeej	Z	eej
Z
eejZddZddZ
dCddZdd	Zd
dZdDd
dZdEddZdFddZddZdGddZdHddZdIddZddZdJd d!Zd"d#Zd$d%Zdd&d'd(Zdd&d)d*Zd+d,Zd-d.ZdKd/d0Z d1d2Z!d3d4Z"d5d6Z#dLd7d8Z$dMd:d;Z%dNd<d=Z&e'd>d?Z(e(j)d@d?Z(dAdBZ*dS)OBaseContextcCs"t}|durtdn|SdS)z(Returns the number of CPUs in the systemNzcannot determine number of cpus)os	cpu_countNotImplementedError)selfZnumrrrr)s
zBaseContext.cpu_countcCs&ddlm}||d}||S)zReturns a manager associated with a running server process

        The managers methods such as `Lock()`, `Condition()` and `Queue()`
        can be used to create shared objects.
        r)SyncManagerctx)Zmanagersrget_contextstart)rrmrrrManager1szBaseContext.ManagerTcCsddlm}||S)z1Returns two connection object connected by a piper)Pipe)
connectionr)rZduplexrrrrr<szBaseContext.PipecCsddlm}||dS)z#Returns a non-recursive lock objectr)Lockr)synchronizerr)rrrrrrAszBaseContext.LockcCsddlm}||dS)zReturns a recursive lock objectr)RLockr)rrr)rrrrrrFszBaseContext.RLockNcCsddlm}|||dS)zReturns a condition objectr)	Conditionr)rr r)rlockr rrrr KszBaseContext.ConditionrcCsddlm}|||dS)zReturns a semaphore objectr)	Semaphorer)rr"r)rvaluer"rrrr"PszBaseContext.SemaphorecCsddlm}|||dS)z"Returns a bounded semaphore objectr)BoundedSemaphorer)rr$r)rr#r$rrrr$UszBaseContext.BoundedSemaphorecCsddlm}||dS)zReturns an event objectr)Eventr)rr%r)rr%rrrr%ZszBaseContext.EventcCs ddlm}|||||dS)zReturns a barrier objectr)Barrierr)rr&r)rZpartiesactionZtimeoutr&rrrr&_szBaseContext.BarrierrcCsddlm}|||dS)Returns a queue objectr)Queuer)queuesr)r)rmaxsizer)rrrr)dszBaseContext.QueuecCsddlm}|||dS)r(r)
JoinableQueuer)r*r,r)rr+r,rrrr,iszBaseContext.JoinableQueuecCsddlm}||dS)r(r)SimpleQueuer)r*r-r)rr-rrrr-nszBaseContext.SimpleQueuercCs"ddlm}||||||dS)zReturns a process pool objectr)Pool)context)Zpoolr.r)rZ	processesZinitializerZinitargsZmaxtasksperchildr.rrrr.ss
zBaseContext.PoolcGsddlm}||g|RS)zReturns a shared objectr)RawValue)sharedctypesr0)rtypecode_or_typeargsr0rrrr0zszBaseContext.RawValuecCsddlm}|||S)zReturns a shared arrayr)RawArray)r1r4)rr2size_or_initializerr4rrrr4szBaseContext.RawArray)r!cGs(ddlm}||g|R||dS)z$Returns a synchronized shared objectr)Valuer!r)r1r6r)rr2r!r3r6rrrr6szBaseContext.ValuecCs ddlm}|||||dS)z#Returns a synchronized shared arrayr)Arrayr7)r1r8r)rr2r5r!r8rrrr8szBaseContext.ArraycCs,tjdkr(ttddr(ddlm}|dS)zCheck whether this is a fake forked process in a frozen executable.
        If so then run code specified by commandline and exit.
        win32frozenFr)freeze_supportN)sysplatformgetattrspawnr;)rr;rrrr;szBaseContext.freeze_supportcCsddlm}|S)zZReturn package logger -- if it does not already exist then
        it is created.
        r)
get_logger)utilr@)rr@rrrr@szBaseContext.get_loggercCsddlm}||S)z8Turn on logging and add a handler which prints to stderrr)
log_to_stderr)rArB)rlevelrBrrrrBszBaseContext.log_to_stderrcCsddlm}dS)zVInstall support for sending connections and sockets
        between processes
        r)rN)r)rrrrrallow_connection_picklingsz%BaseContext.allow_connection_picklingcCsddlm}||dS)zSets the path to a python.exe or pythonw.exe binary used to run
        child processes instead of sys.executable when using the 'spawn'
        start method.  Useful for people embedding Python.
        r)set_executableN)r?rF)r
executablerFrrrrFszBaseContext.set_executablecCsddlm}||dS)zkSet list of module names to try to load in forkserver process.
        This is really just a hint.
        r)set_forkserver_preloadN)
forkserverrH)rZmodule_namesrHrrrrHsz"BaseContext.set_forkserver_preloadcCsF|dur|Szt|}Wn ty8td|dYn0||S)Nzcannot find context for %r)_concrete_contextsKeyError
ValueError_check_available)rmethodrrrrrszBaseContext.get_contextFcCs|jSN)_namerZ
allow_nonerrrget_start_methodszBaseContext.get_start_methodcCstddS)Nz+cannot set start method of concrete context)rLrrNZforcerrrset_start_methodszBaseContext.set_start_methodcCstdS)z_Controls how objects will be reduced to a form that can be
        shared with other processes.r)globalsgetrrrrreducerszBaseContext.reducercCs|td<dS)Nr)rU)rrrrrrXscCsdSrOrrWrrrrMszBaseContext._check_available)T)N)r)r)NN)r)r)NNrN)N)N)F)F)+rr	r
rrr
rstaticmethodrZcurrent_processZparent_processZactive_childrenrrrrrr r"r$r%r&r)r,r-r.r0r4r6r8r;r@rBrErFrHrrRrTpropertyrXsetterrMrrrrrsR

















rc@seZdZdZeddZdS)ProcessNcCstj|SrO)_default_contextrr\_Popen)process_objrrrr^szProcess._Popenrr	r
Z
_start_methodrYr^rrrrr\sr\csFeZdZeZddZd
fdd	ZdddZdd	d
ZddZZ	S)DefaultContextcCs||_d|_dSrO)r]_actual_context)rr/rrr__init__szDefaultContext.__init__Ncs0|dur |jdur|j|_|jSt|SdSrO)rbr]superr)rrN	__class__rrrs

zDefaultContext.get_contextFcCs<|jdur|std|dur,|r,d|_dS|||_dS)Nzcontext has already been set)rbRuntimeErrorrrSrrrrTszDefaultContext.set_start_methodcCs"|jdur|rdS|j|_|jjSrO)rbr]rPrQrrrrRs

zDefaultContext.get_start_methodcCsBtjdkrdgStjdkr"ddgnddg}tjr:|d|SdS)Nr9r?darwinforkrI)r<r=rHAVE_SEND_HANDLEappend)rmethodsrrrget_all_start_methodss

z$DefaultContext.get_all_start_methods)N)F)F)
rr	r
r\rcrrTrRrm
__classcell__rrrerras

rar9c@seZdZdZeddZdS)ForkProcessricCsddlm}||SNr)Popen)Z
popen_forkrqr_rqrrrr^szForkProcess._PopenNr`rrrrrosroc@seZdZdZeddZdS)SpawnProcessr?cCsddlm}||Srp)Zpopen_spawn_posixrqrrrrrr^sSpawnProcess._PopenNr`rrrrrssrsc@seZdZdZeddZdS)ForkServerProcessrIcCsddlm}||Srp)Zpopen_forkserverrqrrrrrr^ szForkServerProcess._PopenNr`rrrrrusruc@seZdZdZeZdS)ForkContextriN)rr	r
rPror\rrrrrv%srvc@seZdZdZeZdSSpawnContextr?Nrr	r
rPrsr\rrrrrx)srxc@seZdZdZeZddZdS)ForkServerContextrIcCstjstddS)Nz%forkserver start method not available)rrjrLrWrrrrM0sz"ForkServerContext._check_availableN)rr	r
rPrur\rMrrrrrz-srz)rir?rIrhr?ric@seZdZdZeddZdS)rsr?cCsddlm}||Srp)Zpopen_spawn_win32rqrrrrrr^DsrtNr`rrrrrsBsc@seZdZdZeZdSrwryrrrrrxIscCst|t_dSrO)rJr]rb)rNrrr_force_start_methodVsr{cCsttddS)Nspawning_popen)r>_tlsrrrrget_spawning_popen_sr~cCs
|t_dSrO)r}r|)popenrrrset_spawning_popenbsrcCs tdurtdt|jdS)NzF%s objects should only be shared between processes through inheritance)r~rgtyper)objrrrassert_spawninges
r) rr<Z	threadingrDrr__all__	Exceptionrrr
robjectrZBaseProcessr\rar=rorsrurvrxrzrJr]r{Zlocalr}r~rrrrrr<module>sJ?,