File "context.cpython-34.pyc"

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


e f)@s[ddlZddlZddlZddlmZgZGdddeZGdddeZGdd	d	eZ	Gd
ddeZ
Gdd
d
eZGdddej
ZGdddeZeddeeDe_ejdkrGdddej
ZGdddej
ZGdddej
ZGdddeZGdddeZGdd d eZied!6ed"6ed#6Zeed!ZnOGd$ddej
ZGd%ddeZied"6Zeed"Zd&d'ZejZd(d)Zd*d+Zd,d-Z dS).N)processc@seZdZdS)ProcessErrorN)__name__
__module____qualname__rr</opt/alt/python34/lib64/python3.4/multiprocessing/context.pyr
src@seZdZdS)BufferTooShortN)rrrrrrr	r
sr
c@seZdZdS)TimeoutErrorN)rrrrrrr	rsrc@seZdZdS)AuthenticationErrorN)rrrrrrr	rsrc@seZdZeZeZeZeZeej	Z	eej
Z
ddZddZdddZ
dd	Zd
dZdd
dZdddZdddZddZddddZdddZdddZddZddfddd Zd!d"Zd#d$Zd%dd&d'Zd%dd(d)Zd*d+Zd,d-Zdd.d/Zd0d1Z d2d3Z!d4d5Z"dd6d7Z#d8d9d:Z$dd;d<Z%d=d>Z&dS)?BaseContextcCs/tj}|dkr'tdn|SdS)z(Returns the number of CPUs in the systemNzcannot determine number of cpus)os	cpu_countNotImplementedError)selfZnumrrr	r'szBaseContext.cpu_countcCs3ddlm}|d|j}|j|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)rrmrrr	Manager/s
zBaseContext.ManagerTcCsddlm}||S)z1Returns two connection object connected by a piper)Pipe)
connectionr)rZduplexrrrr	r:szBaseContext.PipecCs#ddlm}|d|jS)z#Returns a non-recursive lock objectr)Lockr)synchronizerr)rrrrr	r?szBaseContext.LockcCs#ddlm}|d|jS)zReturns a recursive lock objectr)RLockr)rrr)rrrrr	rDszBaseContext.RLockNcCs&ddlm}||d|jS)zReturns a condition objectr)	Conditionr)rrr)rlockrrrr	rIszBaseContext.ConditionrcCs&ddlm}||d|jS)zReturns a semaphore objectr)	Semaphorer)rrr)rvaluerrrr	rNszBaseContext.SemaphorecCs&ddlm}||d|jS)z"Returns a bounded semaphore objectr)BoundedSemaphorer)rr!r)rr r!rrr	r!SszBaseContext.BoundedSemaphorecCs#ddlm}|d|jS)zReturns an event objectr)Eventr)rr"r)rr"rrr	r"XszBaseContext.EventcCs,ddlm}||||d|jS)zReturns a barrier objectr)Barrierr)rr#r)rZpartiesactionZtimeoutr#rrr	r#]szBaseContext.BarrierrcCs&ddlm}||d|jS)zReturns a queue objectr)Queuer)queuesr%r)rmaxsizer%rrr	r%bszBaseContext.QueuecCs&ddlm}||d|jS)zReturns a queue objectr)
JoinableQueuer)r&r(r)rr'r(rrr	r(gszBaseContext.JoinableQueuecCs#ddlm}|d|jS)zReturns a queue objectr)SimpleQueuer)r&r)r)rr)rrr	r)lszBaseContext.SimpleQueuecCs/ddlm}|||||d|jS)zReturns a process pool objectr)Poolcontext)Zpoolr*r)rZ	processesZinitializerZinitargsZmaxtasksperchildr*rrr	r*qszBaseContext.PoolcGsddlm}|||S)zReturns a shared objectr)RawValue)sharedctypesr,)rtypecode_or_typeargsr,rrr	r,xszBaseContext.RawValuecCsddlm}|||S)zReturns a shared arrayr)RawArray)r-r0)rr.size_or_initializerr0rrr	r0}szBaseContext.RawArrayrcGs/ddlm}||d|d|j|S)z$Returns a synchronized shared objectr)Valuerr)r-r2r)rr.rr/r2rrr	r2szBaseContext.ValuecCs/ddlm}|||d|d|jS)z#Returns a synchronized shared arrayr)Arrayrr)r-r3r)rr.r1rr3rrr	r3szBaseContext.ArraycCs?tjdkr;ttddr;ddlm}|ndS)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)sysplatformgetattrspawnr6)rr6rrr	r6s!zBaseContext.freeze_supportcCsddlm}|S)zZReturn package logger -- if it does not already exist then
        it is created.
        r)
get_logger)utilr;)rr;rrr	r;szBaseContext.get_loggercCsddlm}||S)z8Turn on logging and add a handler which prints to stderrr)
log_to_stderr)r<r=)rlevelr=rrr	r=szBaseContext.log_to_stderrcCsddlm}dS)zVInstall support for sending connections and sockets
        between processes
        r)rN)r)rrrrr	allow_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:rA)r
executablerArrr	rAszBaseContext.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)
forkserverrC)rZmodule_namesrCrrr	rCsz"BaseContext.set_forkserver_preloadcCsQ|dkr|Syt|}Wn"tk
rBtd|YnX|j|S)Nzcannot find context for %r)_concrete_contextsKeyError
ValueError_check_available)rmethodrrrr	rs

zBaseContext.get_contextFcCs|jS)N)_name)r
allow_nonerrr	get_start_methodszBaseContext.get_start_methodcCstddS)Nz+cannot set start method of concrete context)rG)rrIrrr	set_start_methodszBaseContext.set_start_methodcCsdS)Nr)rrrr	rHszBaseContext._check_available)'rrrrr
rrstaticmethodrZcurrent_processZactive_childrenrrrrrrrr!r"r#r%r(r)r*r,r0r2r3r6r;r=r@rArCrrLrMrHrrrr	r
sF	
r
c@s(eZdZdZeddZdS)ProcessNcCstjjj|S)N)_default_contextrrO_Popen)process_objrrr	rQszProcess._Popen)rrr
_start_methodrNrQrrrr	rOsrOcsaeZdZeZddZdfddZdddZdd	d
ZddZS)
DefaultContextcCs||_d|_dS)N)rP_actual_context)rr+rrr	__init__s	zDefaultContext.__init__NcsE|dkr1|jdkr*|j|_n|jStj|SdS)N)rUrPsuperr)rrI)	__class__rr	rs
zDefaultContext.get_contextFcCsZ|jdk	r%|r%tdn|dkrD|rDd|_dS|j||_dS)Nzcontext has already been set)rURuntimeErrorr)rrIZforcerrr	rMs	zDefaultContext.set_start_methodcCs2|jdkr(|rdS|j|_n|jjS)N)rUrPrJ)rrKrrr	rLs
zDefaultContext.get_start_methodcCsJtjdkrdgSddlm}|jr<dddgSddgSdS)Nr4r:r)	reductionforkrD)r7r8r?rZHAVE_SEND_HANDLE)rrZrrr	get_all_start_methodss	
z$DefaultContext.get_all_start_methods)	rrrrOrVrrMrLr]rr)rXr	rTsrTccs%|]}|ddkr|VqdS)r_Nr).0xrrr		<genexpr>srar4c@s(eZdZdZeddZdS)ForkProcessr[cCsddlm}||S)Nr)Popen)Z
popen_forkrc)rRrcrrr	rQszForkProcess._PopenN)rrrrSrNrQrrrr	rbsrbc@s(eZdZdZeddZdS)SpawnProcessr:cCsddlm}||S)Nr)rc)Zpopen_spawn_posixrc)rRrcrrr	rQszSpawnProcess._PopenN)rrrrSrNrQrrrr	rd
srdc@s(eZdZdZeddZdS)ForkServerProcessrDcCsddlm}||S)Nr)rc)Zpopen_forkserverrc)rRrcrrr	rQszForkServerProcess._PopenN)rrrrSrNrQrrrr	resrec@seZdZdZeZdS)ForkContextr[N)rrrrJrbrOrrrr	rfsrfc@seZdZdZeZdS)SpawnContextr:N)rrrrJrdrOrrrr	rgsrgc@s(eZdZdZeZddZdS)ForkServerContextrDcCs,ddlm}|js(tdndS)Nr)rZz%forkserver start method not available)r?rZr\rG)rrZrrr	rH&s	z"ForkServerContext._check_availableN)rrrrJrerOrHrrrr	rh#srhr[r:rDc@s(eZdZdZeddZdS)rdr:cCsddlm}||S)Nr)rc)Zpopen_spawn_win32rc)rRrcrrr	rQ6szSpawnProcess._PopenN)rrrrSrNrQrrrr	rd4sc@seZdZdZeZdS)rgr:N)rrrrJrdrOrrrr	rg;scCst|t_dS)N)rErPrU)rIrrr	_force_start_methodHsricCsttddS)Nspawning_popen)r9_tlsrrrr	get_spawning_popenQsrlcCs
|t_dS)N)rkrj)popenrrr	set_spawning_popenTsrncCs/tdkr+tdt|jndS)NzF%s objects should only be shared between processes through inheritance)rlrYtyper)objrrr	assert_spawningWsrq)!rr7Z	threadingr?r__all__	Exceptionrr
rrobjectr
ZBaseProcessrOrTlistdirr8rbrdrerfrgrhrErPriZlocalrkrlrnrqrrrr	<module>sD("