o ?Og @sgdZddlZddlZddlZddlZddlmZddlmZmZm Z m Z ddlm Z m Z m Z ddlmZGdd d ejZeZejZee_d d Zd d ZGdddeZeZeZdddZGdddeZddZddZ dddZ!eZ"dS))Processcurrent_processactive_childrenfreeze_supportLockRLock SemaphoreBoundedSemaphore ConditionEventBarrierQueueManagerPipePool JoinableQueueN)r)rrrr)r r r )r c@s4eZdZddddifddZddZeddZdS) DummyProcessNcCs8tj||||||d|_t|_d|_t|_ dS)NF) threadingThread__init__Z_pidweakrefWeakKeyDictionary _children _start_calledr_parent)selfgrouptargetnameargskwargsrrE/opt/alt/python310/lib64/python3.10/multiprocessing/dummy/__init__.pyr$s   zDummyProcess.__init__cCsN|jturtd|jtd|_t|jdrd|jj|<tj |dS)Nz,Parent is {0!r} but current_process is {1!r}Tr) rr RuntimeErrorformatrhasattrrrrstartrrrr#r'+s   zDummyProcess.startcCs|jr |s dSdS)Nr)ris_aliver(rrr#exitcode5szDummyProcess.exitcode)__name__ __module__ __qualname__rr'propertyr*rrrr#r"s  rcCs2tj}t|D] }|s||dqt|SN)rrlistr)pop)childrenprrr#rDs   rcCdSr/rrrrr#rKrc@seZdZddZddZdS) NamespacecKs|j|dSr/)__dict__update)rkwdsrrr#rSszNamespace.__init__cCsZt|j}g}|D]\}}|ds|d||fq |d|jjd|fS)N_z%s=%rz%s(%s)z, ) r0r7items startswithappendsort __class__r+join)rr;Ztempr valuerrr#__repr__Us  zNamespace.__repr__N)r+r,r-rrBrrrr#r6Rs r6TcCs t||Sr/)array)typecodeZsequencelockrrr#Arrayas rFc@s8eZdZd ddZeddZejddZddZd S) ValueTcCs||_||_dSr/) _typecode_value)rrDrArErrr#res zValue.__init__cCs|jSr/rIr(rrr#rAisz Value.valuecCs ||_dSr/rJ)rrArrr#rAms cCsdt|j|j|jfS)Nz <%s(%r, %r)>)typer+rHrIr(rrr#rBqszValue.__repr__NT)r+r,r-rr.rAsetterrBrrrr#rGds    rGcCs tjtSr/)sysmodulesr+rrrr#r ts r cCr4r/rrrrr#shutdownwr5rPrcCsddlm}||||S)N) ThreadPool)ZpoolrR)Z processesZ initializerZinitargsrRrrr#rzs  rrL)NNr)#__all__rrNrrCZ connectionrrrrrr r r queuer rrrZcurrent_threadrrrrrobjectr6dictr0rFrGr rPrrrrrr#s0