
    ;e                     N   g d Z ddlZddlZddlZddlZddlmZ ddlmZmZm	Z	m
Z
 ddlmZmZmZ ddlmZ  G d d	ej                  ZeZej        Z ej                     e            _        d
 Zd Z G d de          ZeZeZddZ G d de          Zd Zd Z ddZ!eZ"dS ))Processcurrent_processactive_childrenfreeze_supportLockRLock	SemaphoreBoundedSemaphore	ConditionEventBarrierQueueManagerPipePoolJoinableQueue    N   )r   )r   r   r   r	   )r   r
   r   )r   c                   <    e Zd Zddddi fdZd Zed             ZdS )DummyProcessN c                     t           j                            | |||||           d | _        t	          j                    | _        d| _        t                      | _	        d S )NF)
	threadingThread__init___pidweakrefWeakKeyDictionary	_children_start_calledr   _parent)selfgrouptargetnameargskwargss         5/usr/lib/python3.11/multiprocessing/dummy/__init__.pyr   zDummyProcess.__init__$   sS    !!$vtT6JJJ	 244"&((    c                 ,   | j         t                      ur4t          d                    | j         t                                          d| _        t          | j         d          rd | j         j        | <   t          j        	                    |            d S )Nz,Parent is {0!r} but current_process is {1!r}Tr   )
r    r   RuntimeErrorformatr   hasattrr   r   r   startr!   s    r'   r-   zDummyProcess.start+   s    <0000>EEL/"3"35 56 6 6 "4<-- 	0+/DL"4(t$$$$$r(   c                 @    | j         r|                                 sdS d S )Nr   )r   is_aliver.   s    r'   exitcodezDummyProcess.exitcode5   s&     	dmmoo 	14r(   )__name__
__module____qualname__r   r-   propertyr1   r   r(   r'   r   r   "   s]        !$T2 ) ) ) )% % %   X  r(   r   c                      t                      j        } t          |           D ],}|                                s|                     |d            -t          |           S N)r   r   listr0   pop)childrenps     r'   r   r   D   sV      *H(^^ " "zz|| 	"LLD!!!>>r(   c                      d S r7   r   r   r(   r'   r   r   K       Dr(   c                       e Zd Zd Zd ZdS )	Namespacec                :    | j                             |           d S r7   )__dict__update)r!   kwdss     r'   r   zNamespace.__init__S   s    T"""""r(   c                 2   t          | j                                                  }g }|D ]4\  }}|                    d          s|                    |d|           5|                                 | j        j        dd                    |          dS )N_=(, ))	r8   rA   items
startswithappendsort	__class__r2   join)r!   rJ   tempr$   values        r'   __repr__zNamespace.__repr__U   s    T]((**++  	5 	5KD%??3'' 5tttUU3444		>222DIIdOOOODDr(   N)r2   r3   r4   r   rR   r   r(   r'   r?   r?   R   s7        # # #E E E E Er(   r?   Tc                 ,    t          j         | |          S r7   )array)typecodesequencelocks      r'   ArrayrX   a   s    ;x***r(   c                   R    e Zd ZddZed             Zej        d             Zd ZdS )ValueTc                 "    || _         || _        d S r7   )	_typecode_value)r!   rU   rQ   rW   s       r'   r   zValue.__init__e   s    !r(   c                     | j         S r7   r]   r.   s    r'   rQ   zValue.valuei   s
    {r(   c                     || _         d S r7   r_   )r!   rQ   s     r'   rQ   zValue.valuem   s    r(   c                 R    dt          |           j        d| j        d| j        dS )N<rG   rH   z)>)typer2   r\   r]   r.   s    r'   rR   zValue.__repr__q   s,     #Dzz2224>>>$+++NNr(   NT)r2   r3   r4   r   r5   rQ   setterrR   r   r(   r'   rZ   rZ   d   st              X \  \O O O O Or(   rZ   c                  0    t           j        t                   S r7   )sysmodulesr2   r   r(   r'   r   r   t   s    ;x  r(   c                      d S r7   r   r   r(   r'   shutdownrj   w   r=   r(   r   c                 (    ddl m}  || ||          S )N   )
ThreadPool)poolrm   )	processesinitializerinitargsrm   s       r'   r   r   z   s(    !!!!!!:ih777r(   rd   )NNr   )#__all__r   rg   r   rT   
connectionr   r   r   r   r	   r   r
   r   queuer   r   r   r   current_threadr   r   r   r   r   objectr?   dictr8   rX   rZ   r   rj   r   r   r   r(   r'   <module>rx      s         



         > > > > > > > > > > > > / / / / / / / / / /          9#   < *7g799     	 	 	
E 
E 
E 
E 
E 
E 
E 
E + + + +O O O O OF O O O ! ! !	 	 	8 8 8 8 r(   