ok

Mini Shell

Direktori : /usr/lib64/python3.6/multiprocessing/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/multiprocessing/__pycache__/managers.cpython-36.opt-1.pyc

3


 \��@s�ddddgZddlZddlZddlZddlZddlZddlmZddlm	Z	dd	l
mZmZdd
lm
Z
ddlmZddlmZdd
lmZdd�Zejeje�dd�d�D�Zedek	r�dd�ZxeD]Zejee�q�WGdd�de�Zfifdd�Zdd�ZGdd�de�Zdd�Zd d!�ZGd"d#�d#e�ZGd$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+d�d0d1�Z,Gd2d3�d3e�Z-Gd4d5�d5e�Z.d�d6d7�Z/Gd8d9�d9e)�Z0Gd:d;�d;e)�Z1Gd<d=�d=e1�Z2Gd>d?�d?e)�Z3Gd@dA�dAe)�Z4GdBdC�dCe)�Z5GdDdE�dEe)�Z6e+dFd��Z7GdZd[�d[e7�Z8e+d\d��Z9d]deie9_:e+dfd��Z;e+dgd��Z<dsdsdsdededt�e<_:Gdudg�dge<�Z=Gdvd�de&�Z>e>jdwej?�e>jdxej?�e>jdyej@e3�e>jdzejAe1�e>jd{ejBe1�e>jd|ejCe1�e>jd}ejDe1�e>jd~ejEe2�e>jdejFe4�e>jd�e
jGe=�e>jd�ee8�e>jd�eHe9�e>jd5e.e6�e>jd7e/e;�e>jd3e-e5�e>jdee0d�d��e>jdsd�d��dS)��BaseManager�SyncManager�	BaseProxy�Token�N)�
format_exc�)�
connection)�	reduction�get_spawning_popen)�pool)�process)�util)�get_contextcCstj|j|j�ffS)N)�array�typecode�tobytes)�a�r�0/usr/lib64/python3.6/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�Zd	d
�Zdd�Zd
S)rz4
    Type to uniquely indentify 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!r"r#)	r*�
__module__�__qualname__�__doc__�	__slots__r%r&r(r+rrrrr3scCs8|j||||f�|j�\}}|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
r9cCs<|dkr|S|dkrt|�S|dkr0td|�Std�SdS)Nz#ERRORz
#TRACEBACKz#UNSERIALIZABLEzUnserializable message: %s
zUnrecognized message type)�RemoteError�
ValueError)r7r8rrrr2Tsr2c@seZdZdd�ZdS)r:cCs&ddddt|jd�ddS)N�
�-�Kr)�strr5)r$rrr�__str__aszRemoteError.__str__N)r*r,r-r@rrrrr:`sr:cCs6g}x,t|�D] }t||�}t|�r|j|�qW|S)z4
    Return a list of names of methods of `obj`
    )�dirr�callable�append)r�tempr�funcrrr�all_methodshs
rFcCsdd�t|�D�S)zP
    Return a list of names of methods of `obj` which do not start with '_'
    cSsg|]}|ddkr|�qS)r�_r)rrrrrrwsz"public_methods.<locals>.<listcomp>)rF)rrrr�public_methodsssrHc	@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�decrefcCs^||_tj|�|_t|\}}||dd�|_|jj|_ddffi|_i|_i|_	t
j�|_dS)N�)r"Zbacklog�0)
�registryr�AuthenticationString�authkey�listener_client�listenerr"�	id_to_obj�id_to_refcount�id_to_local_proxy_obj�	threading�Lock�mutex)r$rUr"rW�
serializer�Listener�Clientrrrr%�s
zServer.__init__cCs�tj�|_|tj�_zZtj|jd�}d|_|j	�y x|jj
�sN|jjd�q6WWntt
fk
rjYnXWdtjtjkr�tjd�tjt_tjt_tjd�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$rirrr�
serve_forever�s 



zServer.serve_forevercCsPxJy|jj�}Wntk
r&wYnXtj|j|fd�}d|_|j�qWdS)N)rcr5T)rYZaccept�OSErrorr]rh�handle_requestrjrk)r$r3�trrrri�szServer.accepterc'Cs4d}}}y>tj||j�tj||j�|j�}|\}}}}t||�}Wntk
rhdt�f}	Yn>Xy||f|�|�}Wntk
r�dt�f}	Yn
Xd|f}	y|j|	�Wnrtk
�r&}
zTy|jdt�f�Wntk
r�YnXt	j
d|	�t	j
d|�t	j
d|
�WYdd}
~
XnX|j�dS)z)
        Handle a new connection
        Nz
#TRACEBACKz#RETURNzFailure to send message: %rz ... request was %rz ... exception was %r)rZdeliver_challengerWZanswer_challenger1r�	Exceptionrr0r
�info�close)r$r3�funcnamer8�request�ignorer5r6rE�msg�errrry�s2zServer.handle_requestcDCs�tjdtj�j�|j}|j}|j}�x�|jj	��s�yBd}}|�}|\}}}	}
y||\}}}Wn^t
k
r�}
zBy|j|\}}}Wn&t
k
r�}z
|
�WYdd}~XnXWYdd}
~
XnX||kr�td|t
|�|f��t||�}y||	|
�}Wn,tk
�r&}zd|f}WYdd}~XnPX|�o8|j|d�}|�rn|j|||�\}}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"tjdtj�j�tjd	�Yn tk
�r@dt�f}YnXyDy||�Wn2tk
�r�}z|d
t�f�WYdd}~XnXWq(tk
�r�}zBtjdtj�j�tjd|�tjd
|�|j�tjd�WYdd}~Xq(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)r
rsr]�current_threadrr1r0rZrerl�KeyErrorr\�AttributeErrorrrr{�getrKrr"r�fallback_mapping�EOFErrorrprvr|r})r$�connr1r0rZr4rr�identr5r6�exposed�	gettypeid�keZ	second_keZfunction�resr�r�r!ZridentZrexposed�tokenZ
fallback_funcr8rrr�serve_client�sx(


$zServer.serve_clientcCs|S)Nr)r$r�r�rrrr�fallback_getvalue&szServer.fallback_getvaluecCst|�S)N)r?)r$r�r�rrrr�fallback_str)szServer.fallback_strcCst|�S)N)�repr)r$r�r�rrrr�
fallback_repr,szServer.fallback_repr)r@r+z	#GETVALUEcCsdS)Nr)r$r3rrrrP5szServer.dummycCs||j�lg}t|jj��}|j�xD|D]<}|dkr(|jd||j|t|j|d�dd�f�q(Wdj|�SQRXdS)zO
        Return some info --- useful to spot problems with refcounting
        rTz  %s:       refcount=%s
    %srNr>r<)	r_rr[r�sortrCr?rZ�join)r$r3r8rr�rrrrN8s

$zServer.debug_infocCs
t|j�S)z*
        Number of shared objects
        )�lenr[)r$r3rrrrOGszServer.number_of_objectscCsLz:ytjd�|jd�Wnddl}|j�YnXWd|jj�XdS)z'
        Shutdown this process
        z!manager received shutdown message�#RETURNNr)r�N)r
rsr0�	traceback�	print_excre�set)r$r3r�rrrrJNs
zServer.shutdowncOs�|j��|j|\}}}}|dkr,|d}	n
|||�}	|dkrFt|	�}|dk	r^t|�t|�}dt|	�}
tjd||
�|	t|�|f|j|
<|
|j	kr�d|j	|
<WdQRX|j
||
�|
t|�fS)z>
        Create a new shared object and return its id
        Nrz%xz&%r callable returned object with id %r)r_rUrHrr#r
rsr�rZr[rQ�tuple)r$r3r!r5r6rBr��method_to_typeid�	proxytyperr�rrrrK[s 


z
Server.createcCst|j|jd�S)zL
        Return the methods of the shared object indicated by token
        r)r�rZr#)r$r3r�rrrrMzszServer.get_methodscCs"|tj�_|jd�|j|�dS)z=
        Spawn a new thread to serve this connection
        �#RETURNN)r�N)r]r�rr0r�)r$r3rrrrrL�s

zServer.accept_connectioncCs�|j��y|j|d7<Wnhtk
r�}zL||jkrrd|j|<|j||j|<|j|\}}}tjd|�n|�WYdd}~XnXWdQRXdS)Nrz&Server re-enabled tracking & INCREF %r)r_r[r�r\rZr
rs)r$r3r�r�rr�r�rrrrQ�s

z
Server.increfcCs�||jkr$||jkr$tjd|�dS|j�.|j|d8<|j|dkrT|j|=WdQRX||jkr�dfdf|j|<tjd|�|j�|j|=WdQRXdS)NzServer DECREF skipping %rrrzdisposing of obj with id %r)r[r\r
rsr_rZ)r$r3r�rrrrR�s


z
Server.decrefN)r*r,r-r.Zpublicr%rwriryr�r�r�r�r�rPrNrOrJrKrMrLrQrRrrrrrI}s.
"Q
rIc@seZdZdgZdZdZdZdS)�State�valuerr�N)r*r,r-r/�INITIAL�STARTED�SHUTDOWNrrrrr��sr�)�pickleZ	xmlrpclibc@s�eZdZdZiZeZd!dd�Zdd�Zdd	�Z	dffd
d�Z
edffdd
��Zdd�Z
d"dd�Zdd�Zdd�Zdd�Zdd�Zedd��Zedd��Zed#dd ��ZdS)$rz!
    Base class for managers
    Nr�cCs\|dkrtj�j}||_tj|�|_t�|_tj|j_	||_
t|\|_|_
|pTt�|_dS)N)rrfrW�_addressrV�_authkeyr��_stater�r��_serializerrXZ	_Listener�_Clientr�_ctx)r$r"rWr`Zctxrrrr%�s

zBaseManager.__init__cCst|j|j|j|j�S)zX
        Return server object with serve_forever() method and address attribute
        )rI�	_registryr�r�r�)r$rrr�
get_server�s
zBaseManager.get_servercCs8t|j\}}||j|jd�}t|dd�tj|j_dS)z>
        Connect manager object to the server process
        )rWNrP)	rXr�r�r�r9r�r�r�r�)r$rarbr�rrr�connect�szBaseManager.connectc	Cs�|dk	rt|�rtd��tjdd�\}}|jjt|�j|j|j	|j
|j|||fd�|_dj
dd�|jjD��}t|�jd	||j_|jj�|j�|j�|_	|j�tj|j_tj|t|�j|j|j	|j
|j|jfd
d�|_dS)z@
        Spawn a server process for this manager object
        Nzinitializer must be a callableF)Zduplex)rcr5�:css|]}t|�VqdS)N)r?)r�irrr�	<genexpr>�sz$BaseManager.start.<locals>.<genexpr>r=r)r5�exitpriority)rB�	TypeErrorrZPiper�ZProcessr�_run_serverr�r�r�r��_processr�Z	_identityr*rrkr}r1r�r�r�r�r
�Finalize�_finalize_managerr�rJ)r$�initializer�initargs�reader�writerr�rrrrk�s&




zBaseManager.startc	CsN|dk	r||�|j||||�}|j|j�|j�tjd|j�|j�dS)z@
        Create a server, report its address and run it
        Nzmanager serving at %r)�_Serverr0r"r}r
r|rw)	�clsrUr"rWr`r�r�r��serverrrrr�szBaseManager._run_servercOsN|j|j|jd�}zt|dd|f||�\}}Wd|j�Xt||j|�|fS)zP
        Create a new shared object; return the token and exposed tuple
        )rWNrK)r�r�r�r9r}r)r$r!r5r6r�r#r�rrr�_create%s

zBaseManager._createcCs*|jdk	r&|jj|�|jj�s&d|_dS)zC
        Join the manager process (if it has been spawned)
        N)r�r��is_alive)r$�timeoutrrrr�1s

zBaseManager.joinc
Cs.|j|j|jd�}zt|dd�S|j�XdS)zS
        Return some info about the servers shared objects and connections
        )rWNrN)r�r�r�r9r})r$r�rrr�_debug_info:szBaseManager._debug_infoc
Cs.|j|j|jd�}zt|dd�S|j�XdS)z5
        Return the number of shared objects
        )rWNrO)r�r�r�r9r})r$r�rrr�_number_of_objectsDszBaseManager._number_of_objectscCs|jjtjkr|j�|S)N)r�r�r�r�rk)r$rrr�	__enter__NszBaseManager.__enter__cCs|j�dS)N)rJ)r$�exc_type�exc_val�exc_tbrrr�__exit__TszBaseManager.__exit__cCs�|j�r�tjd�y,|||d�}zt|dd�Wd|j�XWntk
rRYnX|jdd�|j�r�tjd�t|d�r�tjd	�|j�|jd
d�|j�r�tjd�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)rWNrJg�?)r�zmanager still alive�	terminatez'trying to `terminate()` manager processg�������?z#manager still alive after terminate)r�r
r|r9r}r{r��hasattrr�r�r�r�r�_address_to_localr�)rr"rWr'r�r�rrrr�Ws.




zBaseManager._finalize_managercCs|jS)N)r�)r$rrr�<lambda>wszBaseManager.<lambda>Tc
s�d|jkr|jj�|_�dkr"t�|p0t�dd�}|p@t�dd�}|r`xt|j��D]\}}qTW|||�f|j�<|r���fdd�}	�|	_t|�|	�dS)z9
        Register a typeid with the manager type
        r�N�	_exposed_�_method_to_typeid_cs`tjd��|j�f|�|�\}}�||j||j|d�}|j|j|jd�}t|dd|jf�|S)Nz)requesting creation of a shared %r object)�managerrWr�)rWrR)	r
rsr�r�r�r�r"r9r#)r$r5r6r�Zexp�proxyr�)r�r!rrrD�sz"BaseManager.register.<locals>.temp)	�__dict__r��copy�	AutoProxyrrrr*�setattr)
r�r!rBr�r�r��
create_method�keyr�rDr)r�r!r�registerys

zBaseManager.register)NNr�N)N)NNNNT)r*r,r-r.r�rIr�r%r�r�rk�classmethodr�r�r�r�r�r�r��staticmethodr��propertyr"r�rrrrr�s*
	$
	

 c@seZdZdd�Zdd�ZdS)�ProcessLocalSetcCstj|dd��dS)NcSs|j�S)N)�clear)rrrrr��sz*ProcessLocalSet.__init__.<locals>.<lambda>)r
�register_after_fork)r$rrrr%�szProcessLocalSet.__init__cCst|�ffS)N)r)r$rrr�
__reduce__�szProcessLocalSet.__reduce__N)r*r,r-r%r�rrrrr��sr�c@s�eZdZdZiZej�Zddd�Zdd�Z	fifd	d
�Z
dd�Zd
d�Ze
dd��Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)rz.
    A base for proxies of shared objects
    NTFc	
Cs�tj�8tjj|jd�}|dkr:tj�t�f}|tj|j<WdQRX|d|_|d|_	||_
|j
j|_||_
||_t|d|_||_|dk	r�tj|�|_n"|j
dk	r�|j
j|_ntj�j|_|r�|j�tj|tj�dS)Nrr)r�_mutexr�r�r"r
ZForkAwareLocalr��_tls�_idset�_tokenr#�_id�_managerr�rXr��_owned_by_managerrrVr�rfrW�_increfr��_after_fork)	r$r�r`r�rWr�rQ�
manager_ownedZ	tls_idsetrrrr%�s*



zBaseProxy.__init__cCsdtjd�tj�j}tj�jdkr4|dtj�j7}|j|jj	|j
d�}t|dd|f�||j_
dS)Nzmaking connection to managerZ
MainThread�|)rWrL)r
rsrrfrr]r�r�r�r"r�r9r�r)r$rr�rrr�_connect�s

zBaseProxy._connectcCs�y|jj}Wn6tk
rBtjdtj�j�|j�|jj}YnX|j	|j
|||f�|j�\}}|dkrp|S|dkr�|\}}|jj
|jd	}	|jj|_|	||j|j|j|d�}
|j|j|jd�}t|dd|jf�|
St||��dS)
zW
        Try to call a method of the referrent and return a copy of the result
        z#thread %r does not own a connectionz#RETURNz#PROXYr)r�rWr�)rWNrR���)r�rr�r
rsr]r�rr�r0r�r1r�r�r!r�r"r�r�r�r9r#r2)r$r4r5r6r�r7r8r�r�r�r�rrr�_callmethod�s,

zBaseProxy._callmethodcCs
|jd�S)z9
        Get a copy of the value of the referent
        z	#GETVALUE)r�)r$rrr�	_getvalueszBaseProxy._getvaluec	Cs�|jrtjd|jj�dS|j|jj|jd�}t|dd|j	f�tjd|jj�|j
j|j	�|joj|jj
}tj|tj|j|j||j|j
|jfdd�|_dS)Nz%owned_by_manager skipped INCREF of %r)rWrQz	INCREF %r�
)r5r�)r�r
rsr�r#r�r"r�r9r�r��addr�r�r�r�_decrefr�Z_close)r$r�r'rrrr�s
zBaseProxy._increfcCs�|j|j�|dks |jtjkr�y2tjd|j�||j|d�}t|dd|jf�Wq�t	k
r�}ztjd|�WYdd}~Xq�Xntjd|j�|r�t
|d�r�tjdtj�j
�|jj�|`dS)Nz	DECREF %r)rWrRz... decref failed %sz%DECREF %r -- manager already shutdownrz-thread %r has no more proxies so closing conn)�discardr#r�r�r�r
rsr"r9r{r�r]r�rrr})r�rWr'ZtlsZidsetr�r�r�rrrr� s 
zBaseProxy._decrefcCsHd|_y|j�Wn0tk
rB}ztjd|�WYdd}~XnXdS)Nzincref failed: %s)r�r�r{r
r|)r$r�rrrr�9s
zBaseProxy._after_forkcCs^i}t�dk	r|j|d<t|dd�rB|j|d<tt|j|j|ffStt|�|j|j|ffSdS)NrW�_isautoFr�)	r
r�rr��RebuildProxyr�r�r�r)r$r6rrrr�As


zBaseProxy.__reduce__cCs|j�S)N)r�)r$�memorrr�__deepcopy__NszBaseProxy.__deepcopy__cCsdt|�j|jjt|�fS)Nz<%s object, typeid %r at %#x>)rr*r�r!r#)r$rrrr+QszBaseProxy.__repr__cCs4y
|jd�Stk
r.t|�dd�dSXdS)zV
        Return representation of the referent (or a fall-back if that fails)
        r+Nrz; '__str__()' failed>r�)r�r{r�)r$rrrr@Us
zBaseProxy.__str__)NNNTF)r*r,r-r.r�r
ZForkAwareThreadLockr�r%r�r�r�r�r�r�r�r�r�r+r@rrrrr�s
(	
cCs�ttj�dd�}|rT|j|jkrTtjd|�d|d<|j|jkrT|j|j|j|j<|j	dd�opttj�dd�}|||fd|i|��S)	z5
    Function used for unpickling proxy objects.
    rgNz*Rebuild a proxy owned by manager, token=%rTr�rQZ_inheritingF)
rrrfr"r
rsr#r\rZ�pop)rEr�r`r6r�rQrrrr�bsr�c
Csrt|�}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��_cacheZdic�meth�	ProxyTyperrr�
MakeProxyTypews
r�Tc
Cs�t|d}|dkrB||j|d�}zt|dd|f�}Wd|j�X|dkrX|dk	rX|j}|dkrjtj�j}td|j	|�}||||||d�}	d|	_
|	S)z*
    Return an auto-proxy for `token`
    rN)rWrMz
AutoProxy[%s])r�rWrQT)rXr"r9r}r�rrfrWr�r!r�)
r�r`r�rWr�rQr�r�r�r�rrrr��s


r�c@seZdZdd�Zdd�ZdS)�	NamespacecKs|jj|�dS)N)r��update)r$r6rrrr%�szNamespace.__init__cCs^t|jj��}g}x,|D]$\}}|jd�s|jd||f�qW|j�d|jjdj|�fS)NrGz%s=%rz%s(%s)z, )	rr�r�
startswithrCr�r)r*r�)r$rrDrr�rrrr+�s
zNamespace.__repr__N)r*r,r-r%r+rrrrr��sr�c@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tj||�S)N)r)rZsequencerrrr�Array�src@s8eZdZdZdd�Zdd�Zd	d
�Zdd�Zd
d�ZdS)�
IteratorProxy�__next__r0�throwr}cCs|S)Nr)r$rrr�__iter__�szIteratorProxy.__iter__cGs|jd|�S)Nr)r�)r$r5rrrr�szIteratorProxy.__next__cGs|jd|�S)Nr0)r�)r$r5rrrr0�szIteratorProxy.sendcGs|jd|�S)Nr)r�)r$r5rrrr�szIteratorProxy.throwcGs|jd|�S)Nr})r�)r$r5rrrr}�szIteratorProxy.closeN)rr0rr})	r*r,r-r�rrr0rr}rrrrr�src@s2eZdZd
Zddd�Zdd�Zd	d
�Zdd�ZdS)�
AcquirerProxy�acquire�releaseTNcCs"|dkr|fn||f}|jd|�S)Nr
)r�)r$Zblockingr�r5rrrr
�szAcquirerProxy.acquirecCs
|jd�S)Nr)r�)r$rrrr�szAcquirerProxy.releasecCs
|jd�S)Nr
)r�)r$rrrr��szAcquirerProxy.__enter__cCs
|jd�S)Nr)r�)r$r�r�r�rrrr��szAcquirerProxy.__exit__)r
r)TN)r*r,r-r�r
rr�r�rrrrr	�s

r	c@s4eZdZdZddd�Zd	d
�Zdd�Zdd
d�ZdS)�ConditionProxyr
rrm�notify�
notify_allNcCs|jd|f�S)Nrm)r�)r$r�rrrrm�szConditionProxy.waitcCs
|jd�S)Nr
)r�)r$rrrr
�szConditionProxy.notifycCs
|jd�S)Nr)r�)r$rrrr�szConditionProxy.notify_allcCsh|�}|r|S|dk	r$tj�|}nd}d}x6|sb|dk	rP|tj�}|dkrPP|j|�|�}q.W|S)Nr)�timeZ	monotonicrm)r$Z	predicater�r8ZendtimeZwaittimerrr�wait_for�s

zConditionProxy.wait_for)r
rrmr
r)N)N)r*r,r-r�rmr
rrrrrrr�s

rc@s2eZdZdZdd�Zdd�Zd	d
�Zddd
�ZdS)�
EventProxyrlr�r�rmcCs
|jd�S)Nrl)r�)r$rrrrlszEventProxy.is_setcCs
|jd�S)Nr�)r�)r$rrrr�szEventProxy.setcCs
|jd�S)Nr�)r�)r$rrrr�szEventProxy.clearNcCs|jd|f�S)Nrm)r�)r$r�rrrrmszEventProxy.wait)rlr�r�rm)N)r*r,r-r�rlr�r�rmrrrrr�s
rc@sNeZdZdZddd�Zdd	�Zd
d�Zedd
��Zedd��Z	edd��Z
dS)�BarrierProxy�__getattribute__rm�abort�resetNcCs|jd|f�S)Nrm)r�)r$r�rrrrm
szBarrierProxy.waitcCs
|jd�S)Nr)r�)r$rrrrszBarrierProxy.abortcCs
|jd�S)Nr)r�)r$rrrrszBarrierProxy.resetcCs|jdd�S)Nr�parties)r)r�)r$rrrrszBarrierProxy.partiescCs|jdd�S)Nr�	n_waiting)r)r�)r$rrrrszBarrierProxy.n_waitingcCs|jdd�S)Nr�broken)r)r�)r$rrrrszBarrierProxy.broken)rrmrr)N)r*r,r-r�rmrrr�rrrrrrrrs
rc@s(eZdZdZdd�Zdd�Zdd	�Zd
S)�NamespaceProxyr�__setattr__�__delattr__cCs0|ddkrtj||�Stj|d�}|d|f�S)NrrGr�r)�objectr)r$r��
callmethodrrr�__getattr__ szNamespaceProxy.__getattr__cCs4|ddkrtj|||�Stj|d�}|d||f�S)NrrGr�r)rrr)r$r�r�rrrrr%szNamespaceProxy.__setattr__cCs0|ddkrtj||�Stj|d�}|d|f�S)NrrGr�r)rrr)r$r�rrrrr*szNamespaceProxy.__delattr__N)rrr)r*r,r-r�rrrrrrrrsrc@s*eZdZdZdd�Zdd�Zeee�ZdS)	�
ValueProxyr�r�cCs
|jd�S)Nr�)r�)r$rrrr�3szValueProxy.getcCs|jd|f�S)Nr�)r�)r$r�rrrr�5szValueProxy.setN)r�r�)r*r,r-r�r�r�r�r�rrrrr1sr�
BaseListProxy�__add__�__contains__�__delitem__�__getitem__�__len__�__mul__�__reversed__�__rmul__�__setitem__rC�count�extend�index�insertr��remove�reverser��__imul__c@seZdZdd�Zdd�ZdS)�	ListProxycCs|jd|f�|S)Nr+)r�)r$r�rrr�__iadd__AszListProxy.__iadd__cCs|jd|f�|S)Nr0)r�)r$r�rrrr0DszListProxy.__imul__N)r*r,r-r2r0rrrrr1@sr1�	DictProxyrr�r�r��has_key�popitem�
setdefaultr��Iterator�
ArrayProxy�	PoolProxy�apply�apply_asyncr}�imap�imap_unorderedr��map�	map_async�starmap�
starmap_asyncr�ZAsyncResult)r;r?rAr<r=c@seZdZdd�Zdd�ZdS)r9cCs|S)Nr)r$rrrr�dszPoolProxy.__enter__cCs|j�dS)N)r�)r$r�r�r�rrrr�fszPoolProxy.__exit__N)r*r,r-r�r�rrrrr9csc@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.rrrrrms	�QueueZ
JoinableQueuerdr^�RLock�	Semaphore�BoundedSemaphore�	Condition�Barrier�Poolr�dictF)r�r�)r�)rrr)NNNT)T)r!r"r#r$r%r&r'r(r)rCr*r+r,r-r�r.r/r�r0)r"r#r$rr%r)r�r�r�r4rrr�r5r6r�r)r%r$r))r:r;r}r<r=r�r>r?r@rAr�)I�__all__rpr]rZqueuerr�r�r�contextr	r
rrr
rrr�Z
view_typesrr Z	view_typerrr9r2r{r:rFrHrIr�rarbZXmlListenerZ	XmlClientrXrr�r�rr�r�r�r�rrrr	rrrrrr r1r3r�r8Z
BasePoolProxyr9rrBrdr^rCrDrErFrGrHrIrrrr�<module>s�


;
]
4


		





Zerion Mini Shell 1.0