U ÙAT^õ ã@sdddddddddd d d d d ddgZddlZddlZddlZddlZddlmZddlmZmZm Z m Z ddlm Z m Z m Z ddlmZGdd„dejƒZeZejZe ¡eƒ_dd„Zdd„ZGdd„deƒZeZeZd'dd„ZGd d!„d!eƒZd"d „Zd#d$„Z d(d&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@s4eZdZddddifdd„Zdd„Zedd„ƒZdS) Ú DummyProcessN©cCs8tj ||||||¡d|_t ¡|_d|_tƒ|_ dS)NF) Ú threadingÚThreadÚ__init__Ú_pidÚweakrefÚWeakKeyDictionaryÚ _childrenÚ _start_calledrÚ_parent)ÚselfÚgroupÚtargetÚnameÚargsÚkwargsrrú6/usr/lib64/python3.8/multiprocessing/dummy/__init__.pyr$s  zDummyProcess.__init__cCsN|jtƒk r td |jtƒ¡ƒ‚d|_t|jdƒr>d|jj|<tj  |¡dS)Nz,Parent is {0!r} but current_process is {1!r}Tr) rrÚ RuntimeErrorÚformatrÚhasattrrrrÚstart©rrrr$r(+s ÿÿ  zDummyProcess.startcCs|jr| ¡sdSdSdS)Nr)rÚis_aliver)rrr$Úexitcode5szDummyProcess.exitcode)Ú__name__Ú __module__Ú __qualname__rr(Úpropertyr+rrrr$r"s rcCs2tƒj}t|ƒD]}| ¡s| |d¡qt|ƒS©N)rrÚlistr*Úpop)ZchildrenÚprrr$rDs  cCsdSr0rrrrr$rKsc@seZdZdd„Zdd„ZdS)Ú NamespacecKs|j |¡dSr0)Ú__dict__Úupdate)rÚkwdsrrr$rSszNamespace.__init__cCsZt|j ¡ƒ}g}|D]$\}}| d¡s| d||f¡q| ¡d|jjd |¡fS)NÚ_z%s=%rz%s(%s)z, ) r1r5ÚitemsÚ startswithÚappendÚsortÚ __class__r,Újoin)rr9Ztempr!Úvaluerrr$Ú__repr__Us  zNamespace.__repr__N)r,r-r.rr@rrrr$r4Rsr4TcCs t ||¡Sr0)Úarray)ÚtypecodeZsequenceÚlockrrr$ÚArrayasrDc@s8eZdZd dd„Zedd„ƒZejdd„ƒZdd„Zd S) ÚValueTcCs||_||_dSr0)Ú _typecodeÚ_value)rrBr?rCrrr$reszValue.__init__cCs|jSr0©rGr)rrr$r?isz Value.valuecCs ||_dSr0rH)rr?rrr$r?mscCsdt|ƒj|j|jfS)Nz <%s(%r, %r)>)Útyper,rFrGr)rrr$r@qszValue.__repr__N)T)r,r-r.rr/r?Úsetterr@rrrr$rEds    rEcCs tjtSr0)ÚsysÚmodulesr,rrrr$r tscCsdSr0rrrrr$ÚshutdownwsrMrcCsddlm}||||ƒS)Né)Ú ThreadPool)ÚpoolrO)Ú processesÚ initializerÚinitargsrOrrr$rzs )T)NNr)#Ú__all__rrKrrAÚ connectionrrrrrr r r Úqueuer rrrÚcurrent_threadrrrrrÚobjectr4Údictr1rDrEr rMrrrrrr$Ú sNý