Viewing File: /opt/alt/python35/lib64/python3.5/multiprocessing/dummy/__pycache__/__init__.cpython-35.pyc



©ÕYfPã@s”dddddddddd	d
ddd
ddgZddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZmZm
Z
ddlmZGdd„dejƒZeZejZejƒeƒ_dd„Zdd„ZGdd„deƒZeZeZddd„ZGd d!„d!eƒZd"d„Zd#d$„Z ddfd%d„Z!eZ"dS)&ÚProcessÚcurrent_processÚactive_childrenÚfreeze_supportÚLockÚRLockÚ	SemaphoreÚBoundedSemaphoreÚ	ConditionÚEventÚBarrierÚQueueÚManagerÚPipeÚPoolÚ
JoinableQueueéNé)r)rrrr)r
r	r)rc@sIeZdZdddfidd„Zdd„Zedd„ƒZdS)ÚDummyProcessNcCsPtjj||||||ƒd|_tjƒ|_d|_tƒ|_	dS)NF)
Ú	threadingÚThreadÚ__init__Z_pidÚweakrefÚWeakKeyDictionaryÚ	_childrenÚ
_start_calledrÚ_parent)ÚselfÚgroupÚtargetÚnameÚargsÚkwargs©r"úC/opt/alt/python35/lib64/python3.5/multiprocessing/dummy/__init__.pyr$s
		zDummyProcess.__init__cCsW|jtƒkst‚d|_t|jdƒrCd|jj|<tjj|ƒdS)NTr)	rrÚAssertionErrorrÚhasattrrrrÚstart)rr"r"r#r&+s
	zDummyProcess.startcCs"|jr|jƒrdSdSdS)Nr)rÚis_alive)rr"r"r#Úexitcode2szDummyProcess.exitcode)Ú__name__Ú
__module__Ú__qualname__rr&Úpropertyr(r"r"r"r#r"srcCsItƒj}x0t|ƒD]"}|jƒs|j|dƒqWt|ƒS)N)rrÚlistr'Úpop)ZchildrenÚpr"r"r#rAs
cCsdS)Nr"r"r"r"r#rHsc@s(eZdZdd„Zdd„ZdS)Ú	NamespacecKs|jj|ƒdS)N)Ú__dict__Úupdate)rÚkwdsr"r"r#rPszNamespace.__init__cCst|jjƒƒ}g}x:|D]2\}}|jdƒs"|jd||fƒq"W|jƒd|jjdj|ƒfS)NÚ_z%s=%rz%s(%s)z, )	r-r1ÚitemsÚ
startswithÚappendÚsortÚ	__class__r)Újoin)rr5ZtemprÚvaluer"r"r#Ú__repr__Rs
zNamespace.__repr__N)r)r*r+rr<r"r"r"r#r0Osr0TcCstj||ƒS)N)Úarray)ÚtypecodeZsequenceÚlockr"r"r#ÚArray^sr@c@sReZdZddd„Zdd„Zdd„ZeeeƒZdd	„Zd
S)ÚValueTcCs||_||_dS)N)Ú	_typecodeÚ_value)rr>r;r?r"r"r#rbs	zValue.__init__cCs|jS)N)rC)rr"r"r#Ú_getesz
Value._getcCs
||_dS)N)rC)rr;r"r"r#Ú_setgsz
Value._setcCs dt|ƒj|j|jfS)Nz<%s(%r, %r)>)Útyper)rBrC)rr"r"r#r<jszValue.__repr__N)	r)r*r+rrDrEr,r;r<r"r"r"r#rAas
rAcCstjtS)N)ÚsysÚmodulesr)r"r"r"r#r
mscCsdS)Nr"r"r"r"r#ÚshutdownpsrIcCs ddlm}||||ƒS)Né)Ú
ThreadPool)ZpoolrK)Z	processesZinitializerZinitargsrKr"r"r#rss)#Ú__all__rrGrr=Z
connectionrrrrrr
r	rZqueuerrrrZcurrent_threadrrrrrÚobjectr0Údictr-r@rAr
rIrrr"r"r"r#Ú<module>s2"	
Back to Directory File Manager