Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/managers.cpython-37.pyc

B

� f��@s�ddddgZddlZddlZddlZddlZddlZddlmZddlm	Z	dd	l
mZmZm
Z
dd
lmZddlmZddlmZdd
lmZdd�Ze�eje�dd�dD�Zedek	r�dd�ZxeD]Ze�ee�q�WGdd�de�Zdifdd�Zdd�ZGdd�de�Zdd�Zdd �ZGd!d"�d"e�Z Gd#d$�d$e�Z!e	j"e	j#fe	j$e	j%fd%�Z&Gd&d�de�Z'Gd'd(�d(e(�Z)Gd)d�de�Z*d*d+�Z+ifd,d-�Z,ddd/d0�Z-Gd1d2�d2e�Z.Gd3d4�d4e�Z/ded5d6�Z0Gd7d8�d8e*�Z1Gd9d:�d:e*�Z2Gd;d<�d<e2�Z3Gd=d>�d>e*�Z4Gd?d@�d@e*�Z5GdAdB�dBe*�Z6GdCdD�dDe*�Z7e,dEdF�Z8GdGdH�dHe8�Z9e,dIdJ�Z:dKdLie:_;e,dMdN�Z<e,dOdP�Z=dQdQdQdLdLdR�e=_;GdSdO�dOe=�Z>GdTd�de'�Z?e?�dUej@�e?�dVej@�e?�dWejAe4�e?�dXejBe2�e?�dYejCe2�e?�dZejDe2�e?�d[ejEe2�e?�d\ejFe3�e?�d]ejGe5�e?�d^ejHe>�e?�d_ee9�e?�d`eIe:�e?�d4e/e7�e?�d6e0e<�e?�d2e.e6�e?jdLe1dadb�e?jdQdadc�dS)f�BaseManager�SyncManager�	BaseProxy�Token�N)�
format_exc�)�
connection)�	reduction�get_spawning_popen�ProcessError)�pool)�process)�util)�get_contextcCstj|j|��ffS)N)�array�typecode�tobytes)�a�r�=/opt/alt/python37/lib64/python3.7/multiprocessing/managers.py�reduce_array$srcCsg|]}tti|����qSr)�type�getattr)�.0�namerrr�
<listcomp>(sr)�items�keys�valuescCstt|�ffS)N)�list)�objrrr�rebuild_as_list*sr!c@s4eZdZdZdZdd�Zdd�Zdd�Zd	d
�ZdS)rz3
    Type to uniquely identify a shared object
    )�typeid�address�idcCs||||_|_|_dS)N)r"r#r$)�selfr"r#r$rrr�__init__9szToken.__init__cCs|j|j|jfS)N)r"r#r$)r%rrr�__getstate__<szToken.__getstate__cCs|\|_|_|_dS)N)r"r#r$)r%�staterrr�__setstate__?szToken.__setstate__cCsd|jj|j|j|jfS)Nz %s(typeid=%r, address=%r, id=%r))�	__class__�__name__r"r#r$)r%rrr�__repr__BszToken.__repr__N)	r+�
__module__�__qualname__�__doc__�	__slots__r&r'r)r,rrrrr3srcCs8|�||||f�|��\}}|dkr*|St||��dS)zL
    Send a message to manager using connection `c` and return response
    z#RETURNN)�send�recv�convert_to_error)�cr$�
methodname�args�kwds�kind�resultrrr�dispatchJs
r:cCsd|dkr|S|dkrRt|t�s4td�||t|����|dkrHtd|�St|�Sntd�|��SdS)Nz#ERROR)z
#TRACEBACKz#UNSERIALIZABLEz.Result {0!r} (kind '{1}') type is {2}, not strz#UNSERIALIZABLEzUnserializable message: %s
zUnrecognized message type {!r})�
isinstance�str�	TypeError�formatr�RemoteError�
ValueError)r8r9rrrr3Ts

r3c@seZdZdd�ZdS)r?cCsdt|jd�dS)NzM
---------------------------------------------------------------------------
rzK---------------------------------------------------------------------------)r<r6)r%rrr�__str__dszRemoteError.__str__N)r+r-r.rArrrrr?csr?cCs6g}x,t|�D] }t||�}t|�r|�|�qW|S)z4
    Return a list of names of methods of `obj`
    )�dirr�callable�append)r �tempr�funcrrr�all_methodsks
rGcCsdd�t|�D�S)zP
    Return a list of names of methods of `obj` which do not start with '_'
    cSsg|]}|ddkr|�qS)r�_r)rrrrrrzsz"public_methods.<locals>.<listcomp>)rG)r rrr�public_methodsvsrIc	@s�eZdZdZdddddddd	d
g	Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zeee
d�Z
dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.S)/�ServerzM
    Server class which runs in a process controlled by a manager object
    �shutdown�create�accept_connection�get_methods�
debug_info�number_of_objects�dummy�incref�decrefcCsxt|t�std�|t|����||_t�|�|_t	|\}}||dd�|_
|j
j|_ddi|_i|_
i|_t��|_dS)Nz&Authkey {0!r} is type {1!s}, not bytes�)r#Zbacklog�0)Nr)r;�bytesr=r>r�registryr
�AuthenticationString�authkey�listener_client�listenerr#�	id_to_obj�id_to_refcount�id_to_local_proxy_obj�	threading�Lock�mutex)r%rWr#rY�
serializer�Listener�Clientrrrr&�s


zServer.__init__c	Cs�t��|_|t��_zZtj|jd�}d|_|�	�y x|j�
�sN|j�d�q6WWntt
fk
rjYnXWdtjtjkr�t�d�tjt_tjt_t�d�XdS)z(
        Run the server forever
        )�targetTrNzresetting stdout, stderrr)r_�Event�
stop_eventr
�current_process�_manager_server�Thread�accepter�daemon�start�is_set�wait�KeyboardInterrupt�
SystemExit�sys�stdout�
__stdout__r�debug�
__stderr__�stderr�exit)r%rkrrr�
serve_forever�s 



zServer.serve_forevercCsPxJy|j��}Wntk
r&wYnXtj|j|fd�}d|_|��qWdS)N)rer6T)r[Zaccept�OSErrorr_rj�handle_requestrlrm)r%r4�trrrrk�szServer.acceptercCsLd}}}yTt�||j�t�||j�|��}|\}}}}||jksTtd|��t||�}Wntk
r~dt	�f}	Yn>Xy||f|�|�}Wntk
r�dt	�f}	Yn
Xd|f}	y|�
|	�Wnttk
�r>}
zTy|�
dt	�f�Wntk
�rYnXt�d|	�t�d|�t�d|
�Wdd}
~
XYnX|�
�dS)z)
        Handle a new connection
        Nz%r unrecognizedz
#TRACEBACKz#RETURNzFailure to send message: %rz ... request was %rz ... exception was %r)rZdeliver_challengerYZanswer_challenger2�public�AssertionErrorr�	Exceptionrr1r�info�close)r%r4�funcnamer9�request�ignorer6r7rF�msg�errrr{�s4zServer.handle_requestc
Cs�t�dt��j�|j}|j}|j}�x�|j�	��s�yBd}}|�}|\}}}	}
y||\}}}Wn^t
k
r�}
z@y|j|\}}}Wn&t
k
r�}z|
�Wdd}~XYnXWdd}
~
XYnX||kr�td|t
|�|f��t||�}y||	|
�}Wn,tk
�r&}zd|f}Wdd}~XYnPX|�o8|�|d�}|�rn|�|||�\}}t||j|�}d||ff}nd|f}Wn�tk
�r�|dk�r�dt�f}nNy,|j|}|||||f|	�|
�}d|f}Wn tk
�r�dt�f}YnXYnPtk
�r"t�dt��j�t�d	�Yn tk
�r@dt�f}YnXyDy||�Wn2tk
�r�}z|d
t�f�Wdd}~XYnXWq(tk
�r�}z@t�dt��j�t�d|�t�d
|�|��t�d�Wdd}~XYq(Xq(WdS)zQ
        Handle requests from the proxies in a particular process/thread
        z$starting server thread to service %rNz+method %r of %r object is not in exposed=%rz#ERRORz#PROXYz#RETURNz
#TRACEBACKz$got EOF -- exiting thread serving %rrz#UNSERIALIZABLEzexception in thread serving %rz ... message was %rz ... exception was %rr)rrur_�current_threadrr2r1r\rgrn�KeyErrorr^�AttributeErrorrrr�getrLrr#r�fallback_mapping�EOFErrorrrrxr�r�)r%�connr2r1r\r5r r��identr6r7�exposed�	gettypeid�keZ	second_keZfunctionZresr�r�r"ZridentZrexposed�tokenZ
fallback_funcr9rrr�serve_client�sx(


$zServer.serve_clientcCs|S)Nr)r%r�r�r rrr�fallback_getvalue,szServer.fallback_getvaluecCst|�S)N)r<)r%r�r�r rrr�fallback_str/szServer.fallback_strcCst|�S)N)�repr)r%r�r�r rrr�
fallback_repr2szServer.fallback_repr)rAr,z	#GETVALUEcCsdS)Nr)r%r4rrrrQ;szServer.dummyc
Cs||j�lg}t|j���}|��xD|D]<}|dkr(|�d||j|t|j|d�dd�f�q(Wd�|�SQRXdS)zO
        Return some info --- useful to spot problems with refcounting
        rUz  %s:       refcount=%s
    %srN�K�
)	rarr]r�sortrDr<r\�join)r%r4r9rr�rrrrO>s

$zServer.debug_infocCs
t|j�S)z*
        Number of shared objects
        )�lenr])r%r4rrrrPNszServer.number_of_objectscCsLz:yt�d�|�d�Wnddl}|��YnXWd|j��XdS)z'
        Shutdown this process
        z!manager received shutdown message)z#RETURNNrN)rrur1�	traceback�	print_excrg�set)r%r4r�rrrrKUs
zServer.shutdownc	Os�t|�dkr|^}}}}nz|s(td��nld|krDtdt|�d��|�d�}t|�dkrf|^}}}n.d|kr�tdt|�d��|�d�}|^}}t|�}|j��|j|\}}}}|dkr�|s�t|�dkr�td	��|d
}	n
|||�}	|dkr�t|	�}|dk	�r4t|t	��s$td�
|t|����t|�t|�}dt
|	�}
t�d
||
�|	t|�|f|j|
<|
|jk�rxd
|j|
<WdQRX|�||
�|
t|�fS)z>
        Create a new shared object and return its id
        �z8descriptor 'create' of 'Server' object needs an argumentr"z7create expected at least 2 positional arguments, got %dr�r4Nz4Without callable, must have one non-keyword argumentrz,Method_to_typeid {0!r}: type {1!s}, not dictz%xz&%r callable returned object with id %r)r�r=�pop�tuplerarWr@rIr;�dictr>rrr$rrur�r\r]rR)r6r7r%r4r"rCr��method_to_typeid�	proxytyper r�rrrrLbsN





z
Server.createcCst|j|jd�S)zL
        Return the methods of the shared object indicated by token
        r)r�r\r$)r%r4r�rrrrN�szServer.get_methodscCs"|t��_|�d�|�|�dS)z=
        Spawn a new thread to serve this connection
        )z#RETURNNN)r_r�rr1r�)r%r4rrrrrM�s

zServer.accept_connectioncCs�|j��y|j|d7<Wnhtk
r�}zJ||jkrrd|j|<|j||j|<|j|\}}}t�d|�n|�Wdd}~XYnXWdQRXdS)Nrz&Server re-enabled tracking & INCREF %r)rar]r�r^r\rru)r%r4r�r�r r�r�rrrrR�s

z
Server.increfc	Cs�||jkr$||jkr$t�d|�dS|j�Z|j|dkrXtd�||j||j|���|j|d8<|j|dkr�|j|=WdQRX||jkr�d|j|<t�d|�|j�|j|=WdQRXdS)NzServer DECREF skipping %rrz+Id {0!s} ({1!r}) has refcount {2:n}, not 1+r)NrNzdisposing of obj with id %r)r]r^rrurar~r>r\)r%r4r�rrrrS�s$




z
Server.decrefN)r+r-r.r/r}r&ryrkr{r�r�r�r�r�rQrOrPrKrLrNrMrRrSrrrrrJ�s.
"Q
8rJc@seZdZdgZdZdZdZdS)�State�valuerrr�N)r+r-r.r0�INITIAL�STARTED�SHUTDOWNrrrrr��sr�)�pickleZ	xmlrpclibc@s�eZdZdZiZeZd"dd�Zdd�Zdd	�Z	d#dd�Z
ed$d
d��Zdd�Z
d%dd�Zdd�Zdd�Zdd�Zdd�Zedd��Zedd��Zed&d d!��ZdS)'rz!
    Base class for managers
    Nr�cCs\|dkrt��j}||_t�|�|_t�|_tj|j_	||_
t|\|_|_
|pTt�|_dS)N)r
rhrY�_addressrX�_authkeyr��_stater�r��_serializerrZZ	_Listener�_Clientr�_ctx)r%r#rYrbZctxrrrr&�s

zBaseManager.__init__cCsf|jjtjkrP|jjtjkr&td��n*|jjtjkr>td��ntd�|jj���t|j	|j
|j|j�S)zX
        Return server object with serve_forever() method and address attribute
        zAlready started serverzManager has shut downzUnknown state {!r})
r�r�r�r�r�rr�r>rJ�	_registryr�r�r�)r%rrr�
get_servers


zBaseManager.get_servercCs8t|j\}}||j|jd�}t|dd�tj|j_dS)z>
        Connect manager object to the server process
        )rYNrQ)	rZr�r�r�r:r�r�r�r�)r%rcrdr�rrr�connectszBaseManager.connectrc	Cs4|jjtjkrP|jjtjkr&td��n*|jjtjkr>td��ntd�|jj���|dk	rht|�sht	d��t
jdd�\}}|jj
t|�j|j|j|j|j|||fd�|_d	�d
d�|jjD��}t|�jd||j_|j��|��|��|_|��tj|j_tj|t|�j|j|j|j|j|jfd
d�|_ dS)z@
        Spawn a server process for this manager object
        zAlready started serverzManager has shut downzUnknown state {!r}Nzinitializer must be a callableF)Zduplex)rer6�:css|]}t|�VqdS)N)r<)r�irrr�	<genexpr>1sz$BaseManager.start.<locals>.<genexpr>�-r)r6�exitpriority)!r�r�r�r�r�rr�r>rCr=rZPiper�ZProcessr�_run_serverr�r�r�r��_processr�Z	_identityr+rrmr�r2r�Finalize�_finalize_managerr�rK)r%�initializer�initargs�reader�writerr�rrrrms4






zBaseManager.startc	CsN|dk	r||�|�||||�}|�|j�|��t�d|j�|��dS)z@
        Create a server, report its address and run it
        Nzmanager serving at %r)�_Serverr1r#r�rr�ry)	�clsrWr#rYrbr�r�r��serverrrrr�CszBaseManager._run_servercOsv|^}}}t|�}|jjtjks(td��|j|j|jd�}zt	|dd|f||�\}}Wd|�
�Xt||j|�|fS)zP
        Create a new shared object; return the token and exposed tuple
        zserver not yet started)rYNrL)r�r�r�r�r�r~r�r�r�r:r�r)r6r7r%r"r�r$r�rrr�_createWs

zBaseManager._createcCs*|jdk	r&|j�|�|j��s&d|_dS)zC
        Join the manager process (if it has been spawned)
        N)r�r��is_alive)r%�timeoutrrrr�fs

zBaseManager.joincCs.|j|j|jd�}zt|dd�S|��XdS)zS
        Return some info about the servers shared objects and connections
        )rYNrO)r�r�r�r:r�)r%r�rrr�_debug_infooszBaseManager._debug_infocCs.|j|j|jd�}zt|dd�S|��XdS)z5
        Return the number of shared objects
        )rYNrP)r�r�r�r:r�)r%r�rrr�_number_of_objectsyszBaseManager._number_of_objectscCsj|jjtjkr|��|jjtjkrf|jjtjkr<td��n*|jjtjkrTtd��ntd�|jj���|S)NzUnable to start serverzManager has shut downzUnknown state {!r})	r�r�r�r�rmr�rr�r>)r%rrr�	__enter__�s

zBaseManager.__enter__cCs|��dS)N)rK)r%�exc_type�exc_val�exc_tbrrr�__exit__�szBaseManager.__exit__cCs�|��r�t�d�y,|||d�}zt|dd�Wd|��XWntk
rRYnX|jdd�|��r�t�d�t|d�r�t�d	�|��|jd
d�|��r�t�d�t	j
|_ytj
|=Wntk
r�YnXdS)zQ
        Shutdown the manager process; will be registered as a finalizer
        z#sending shutdown message to manager)rYNrKg�?)r�zmanager still alive�	terminatez'trying to `terminate()` manager processg�������?z#manager still alive after terminate)r�rr�r:r�rr��hasattrr�r�r�r�r�_address_to_localr�)r
r#rYr(r�r�rrrr��s.




zBaseManager._finalize_managercCs|jS)N)r�)r%rrrr#�szBaseManager.addressTc
s�d|jkr|j��|_�dkr"t�|p0t�dd�}|p@t�dd�}|r�xHt|���D]8\}}t|�tkstt	d|��t|�tksTt	d|��qTW|||�f|j�<|rƇ�fdd�}	�|	_
t|�|	�dS)z9
        Register a typeid with the manager type
        r�N�	_exposed_�_method_to_typeid_z%r is not a stringcs`t�d��|j�f|�|�\}}�||j||j|d�}|j|j|jd�}t|dd|jf�|S)Nz)requesting creation of a shared %r object)�managerrYr�)rYrS)	rrur�r�r�r�r#r:r$)r%r6r7r�Zexp�proxyr�)r�r"rrrE�sz"BaseManager.register.<locals>.temp)�__dict__r��copy�	AutoProxyrrrrr<r~r+�setattr)
r�r"rCr�r�r��
create_method�keyr�rEr)r�r"r�register�s 

zBaseManager.register)NNr�N)Nr)Nr)N)NNNNT)r+r-r.r/r�rJr�r&r�r�rm�classmethodr�r�r�r�r�r�r��staticmethodr��propertyr#r�rrrrr�s*
	
+
	


 c@seZdZdd�Zdd�ZdS)�ProcessLocalSetcCst�|dd��dS)NcSs|��S)N)�clear)r rrr�<lambda>��z*ProcessLocalSet.__init__.<locals>.<lambda>)r�register_after_fork)r%rrrr&�szProcessLocalSet.__init__cCst|�dfS)Nr)r)r%rrr�
__reduce__�szProcessLocalSet.__reduce__N)r+r-r.r&r�rrrrr��sr�c@s�eZdZdZiZe��Zddd�Zdd�Z	d	ifd
d�Z
dd
�Zdd�Ze
dd��Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)rz.
    A base for proxies of shared objects
    NTFc		Cs�tj�8tj�|jd�}|dkr:t��t�f}|tj|j<WdQRX|d|_|d|_	||_
|j
j|_||_
||_t|d|_||_|dk	r�t�|�|_n"|j
dk	r�|j
j|_nt��j|_|r�|��t�|tj�dS)Nrr)r�_mutexr�r�r#rZForkAwareLocalr��_tls�_idset�_tokenr$�_id�_managerr�rZr��_owned_by_managerr
rXr�rhrY�_increfr��_after_fork)	r%r�rbr�rYr�rR�
manager_ownedZ	tls_idsetrrrr&�s*



zBaseProxy.__init__cCsdt�d�t��j}t��jdkr4|dt��j7}|j|jj	|j
d�}t|dd|f�||j_
dS)Nzmaking connection to managerZ
MainThread�|)rYrM)rrur
rhrr_r�r�r�r#r�r:r�r)r%rr�rrr�_connects

zBaseProxy._connectrcCs�y|jj}Wn6tk
rBt�dt��j�|��|jj}YnX|�	|j
|||f�|��\}}|dkrp|S|dkr�|\}}|jj
|jd}	|jj|_|	||j|j|j|d�}
|j|j|jd�}t|dd|jf�|
St||��dS)	zV
        Try to call a method of the referent and return a copy of the result
        z#thread %r does not own a connectionz#RETURNz#PROXY���)r�rYr�)rYNrS)r�rr�rrur_r�rr�r1r�r2r�r�r"r�r#r�r�r�r:r$r3)r%r5r6r7r�r8r9r�r�r�r�rrr�_callmethod&s,

zBaseProxy._callmethodcCs
|�d�S)z9
        Get a copy of the value of the referent
        z	#GETVALUE)r�)r%rrr�	_getvalueDszBaseProxy._getvaluec	Cs�|jrt�d|jj�dS|j|jj|jd�}t|dd|j	f�t�d|jj�|j
�|j	�|joj|jj
}tj|tj|j|j||j|j
|jfdd�|_dS)Nz%owned_by_manager skipped INCREF of %r)rYrRz	INCREF %r�
)r6r�)r�rrur�r$r�r#r�r:r�r��addr�r�r�r�_decrefr�Z_close)r%r�r(rrrr�Js
zBaseProxy._increfc
Cs�|�|j�|dks |jtjkr�y2t�d|j�||j|d�}t|dd|jf�Wq�t	k
r�}zt�d|�Wdd}~XYq�Xnt�d|j�|s�t
|d�r�t�dt��j
�|j��|`dS)Nz	DECREF %r)rYrSz... decref failed %sz%DECREF %r -- manager already shutdownrz-thread %r has no more proxies so closing conn)�discardr$r�r�r�rrur#r:rr�r_r�rrr�)r�rYr(ZtlsZidsetr�r�r�rrrr�^s 
zBaseProxy._decrefc
CsHd|_y|��Wn0tk
rB}zt�d|�Wdd}~XYnXdS)Nzincref failed: %s)r�r�rrr�)r%r�rrrr�ws
zBaseProxy._after_forkcCs^i}t�dk	r|j|d<t|dd�rB|j|d<tt|j|j|ffStt|�|j|j|ffSdS)NrY�_isautoFr�)	r
r�rr��RebuildProxyr�r�r�r)r%r7rrrr�s


zBaseProxy.__reduce__cCs|��S)N)r�)r%Zmemorrr�__deepcopy__�szBaseProxy.__deepcopy__cCsdt|�j|jjt|�fS)Nz<%s object, typeid %r at %#x>)rr+r�r"r$)r%rrrr,�szBaseProxy.__repr__cCs4y
|�d�Stk
r.t|�dd�dSXdS)zV
        Return representation of the referent (or a fall-back if that fails)
        r,Nr�z; '__str__()' failed>)r�rr�)r%rrrrA�s
zBaseProxy.__str__)NNNTF)r+r-r.r/r�rZForkAwareThreadLockr�r&r�r�r�r�r�r�r�r�r�r,rArrrrr�s
(	
cCs�tt��dd�}|rT|j|jkrTt�d|�d|d<|j|jkrT|j|j|j|j<|�	dd�optt��dd�}|||fd|i|��S)	z5
    Function used for unpickling proxy objects.
    riNz*Rebuild a proxy owned by manager, token=%rTr�rRZ_inheritingF)
rr
rhr#rrur$r^r\r�)rFr�rbr7r�rRrrrr��sr�cCsrt|�}y|||fStk
r(YnXi}x|D]}td||f|�q4Wt|tf|�}||_||||f<|S)zB
    Return a proxy type whose methods are given by `exposed`
    zLdef %s(self, *args, **kwds):
        return self._callmethod(%r, args, kwds))r�r��execrrr�)rr��_cacheZdicZmeth�	ProxyTyperrr�
MakeProxyType�s
rTc
Cs�t|d}|dkrB||j|d�}zt|dd|f�}Wd|��X|dkrX|dk	rX|j}|dkrjt��j}td|j	|�}||||||d�}	d|	_
|	S)z*
    Return an auto-proxy for `token`
    rN)rYrNz
AutoProxy[%s])r�rYrRT)rZr#r:r�r�r
rhrYrr"r�)
r�rbr�rYr�rRr�r�r�r�rrrr��s


r�c@seZdZdd�Zdd�ZdS)�	NamespacecKs|j�|�dS)N)r��update)r%r7rrrr&�szNamespace.__init__cCs^t|j���}g}x,|D]$\}}|�d�s|�d||f�qW|��d|jjd�|�fS)NrHz%s=%rz%s(%s)z, )	rr�r�
startswithrDr�r*r+r�)r%rrErr�rrrr,�s
zNamespace.__repr__N)r+r-r.r&r,rrrrr�src@s8eZdZddd�Zdd�Zdd�Zdd	�Zeee�Zd
S)�ValueTcCs||_||_dS)N)�	_typecode�_value)r%rr��lockrrrr&�szValue.__init__cCs|jS)N)r)r%rrrr��sz	Value.getcCs
||_dS)N)r)r%r�rrrr��sz	Value.setcCsdt|�j|j|jfS)Nz
%s(%r, %r))rr+rr)r%rrrr,�szValue.__repr__N)T)	r+r-r.r&r�r�r,r�r�rrrrr�s

rcCst�||�S)N)r)rZsequencerrrr�Arraysrc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�
IteratorProxy)�__next__r1�throwr�cCs|S)Nr)r%rrr�__iter__	szIteratorProxy.__iter__cGs|�d|�S)Nr
)r�)r%r6rrrr
szIteratorProxy.__next__cGs|�d|�S)Nr1)r�)r%r6rrrr1
szIteratorProxy.sendcGs|�d|�S)Nr)r�)r%r6rrrrszIteratorProxy.throwcGs|�d|�S)Nr�)r�)r%r6rrrr�szIteratorProxy.closeN)	r+r-r.r�rr
r1rr�rrrrr	sr	c@s2eZdZdZddd�Zdd�Zdd	�Zd
d�ZdS)
�
AcquirerProxy)�acquire�releaseTNcCs"|dkr|fn||f}|�d|�S)Nr)r�)r%Zblockingr�r6rrrrszAcquirerProxy.acquirecCs
|�d�S)Nr)r�)r%rrrrszAcquirerProxy.releasecCs
|�d�S)Nr)r�)r%rrrr�szAcquirerProxy.__enter__cCs
|�d�S)Nr)r�)r%r�r�r�rrrr�szAcquirerProxy.__exit__)TN)r+r-r.r�rrr�r�rrrrr
s

r
c@s6eZdZdZddd�Zd
dd�Zdd	�Zdd
d�ZdS)�ConditionProxy)rrro�notify�
notify_allNcCs|�d|f�S)Nro)r�)r%r�rrrro$szConditionProxy.waitrcCs|�d|f�S)Nr)r�)r%�nrrrr&szConditionProxy.notifycCs
|�d�S)Nr)r�)r%rrrr(szConditionProxy.notify_allcCsh|�}|r|S|dk	r$t��|}nd}d}x6|sb|dk	rP|t��}|dkrPP|�|�|�}q.W|S)Nr)�timeZ	monotonicro)r%Z	predicater�r9ZendtimeZwaittimerrr�wait_for*s

zConditionProxy.wait_for)N)r)N)r+r-r.r�rorrrrrrrr"s


rc@s2eZdZdZdd�Zdd�Zdd�Zdd	d
�ZdS)�
EventProxy)rnr�r�rocCs
|�d�S)Nrn)r�)r%rrrrn?szEventProxy.is_setcCs
|�d�S)Nr�)r�)r%rrrr�AszEventProxy.setcCs
|�d�S)Nr�)r�)r%rrrr�CszEventProxy.clearNcCs|�d|f�S)Nro)r�)r%r�rrrroEszEventProxy.wait)N)r+r-r.r�rnr�r�rorrrrr=s
rc@sNeZdZdZddd�Zdd�Zdd�Zed	d
��Zedd��Z	ed
d��Z
dS)�BarrierProxy)�__getattribute__ro�abort�resetNcCs|�d|f�S)Nro)r�)r%r�rrrroKszBarrierProxy.waitcCs
|�d�S)Nr)r�)r%rrrrMszBarrierProxy.abortcCs
|�d�S)Nr)r�)r%rrrrOszBarrierProxy.resetcCs|�dd�S)Nr)�parties)r�)r%rrrrQszBarrierProxy.partiescCs|�dd�S)Nr)�	n_waiting)r�)r%rrrrTszBarrierProxy.n_waitingcCs|�dd�S)Nr)�broken)r�)r%rrrrWszBarrierProxy.broken)N)r+r-r.r�rorrr�rrrrrrrrIs
rc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�NamespaceProxy)r�__setattr__�__delattr__cCs0|ddkrt�||�St�|d�}|d|f�S)NrrHr�r)�objectr)r%r��
callmethodrrr�__getattr__^szNamespaceProxy.__getattr__cCs4|ddkrt�|||�St�|d�}|d||f�S)NrrHr�r)r!rr)r%r�r�r"rrrrcszNamespaceProxy.__setattr__cCs0|ddkrt�||�St�|d�}|d|f�S)NrrHr�r )r!r r)r%r�r"rrrr hszNamespaceProxy.__delattr__N)r+r-r.r�r#rr rrrrr\src@s*eZdZdZdd�Zdd�Zeee�ZdS)�
ValueProxy)r�r�cCs
|�d�S)Nr�)r�)r%rrrr�qszValueProxy.getcCs|�d|f�S)Nr�)r�)r%r�rrrr�sszValueProxy.setN)r+r-r.r�r�r�r�r�rrrrr$osr$�
BaseListProxy)�__add__�__contains__�__delitem__�__getitem__�__len__�__mul__�__reversed__�__rmul__�__setitem__rD�count�extend�index�insertr��remove�reverser��__imul__c@seZdZdd�Zdd�ZdS)�	ListProxycCs|�d|f�|S)Nr0)r�)r%r�rrr�__iadd__szListProxy.__iadd__cCs|�d|f�|S)Nr5)r�)r%r�rrrr5�szListProxy.__imul__N)r+r-r.r7r5rrrrr6~sr6�	DictProxy)r'r(r)rr*r.r�r�r�rrr��popitem�
setdefaultrrr�Iterator�
ArrayProxy)r*r)r.�	PoolProxy)Zapply�apply_asyncr��imap�imap_unorderedr��map�	map_async�starmap�
starmap_asyncr�ZAsyncResult)r>rBrDr?r@c@seZdZdd�Zdd�ZdS)r=cCs|S)Nr)r%rrrr��szPoolProxy.__enter__cCs|��dS)N)r�)r%r�r�r�rrrr��szPoolProxy.__exit__N)r+r-r.r�r�rrrrr=�sc@seZdZdZdS)ra(
    Subclass of `BaseManager` which supports a number of shared object types.

    The types registered are those intended for the synchronization
    of threads, plus `dict`, `list` and `Namespace`.

    The `multiprocessing.Manager()` function creates started instances of
    this class.
    N)r+r-r.r/rrrrr�s	�QueueZ
JoinableQueuerfr`�RLock�	Semaphore�BoundedSemaphore�	Condition�Barrier�Poolrr�F)r�r�)r�)NNNT)T)J�__all__rrr_rZqueuerr�r�r�contextr	r
rrr
rrrr�Z
view_typesrr!Z	view_typer!rr:r3rr?rGrIrJr�rcrdZXmlListenerZ	XmlClientrZrr�r�rr�rr�rrrr	r
rrrrr$r%r6r8r�r<Z
BasePoolProxyr=rrErfr`rFrGrHrIrJrKr�rrrr�<module>s�


\
w
4


		





Hacked By AnonymousFox1.0, Coded By AnonymousFox