Your IP : 18.219.158.84


Current Path : /opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/managers.cpython-33.pyc

�
��f�c@s�ddddgZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZdd	lmZmZdd
lmZdd�Zejeje�d
d�dddfD�Zedek	rMdd�Zx:eD]2Zejee�ddlZejee�qWnGdd�de�Zfidd�Zdd�Z Gdd�de!�Z"dd�Z#dd�Z$Gdd �d e�Z%Gd!d"�d"e�Z&ie
j'e
j(fd#6e
j)e
j*fd$6Z+Gd%d�de�Z,Gd&d'�d'e-�Z.Gd(d�de�Z/d)d*�Z0id+d,�Z1e2e2e2e3d-d.�Z4Gd/d0�d0e�Z5Gd1d2�d2e�Z6e3d3d4�Z7Gd5d6�d6e/�Z8Gd7d8�d8e/�Z9Gd9d:�d:e9�Z:Gd;d<�d<e/�Z;Gd=d>�d>e/�Z<Gd?d@�d@e/�Z=GdAdB�dBe/�Z>e1dCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVf�Z?GdWdX�dXe?�Z@e1dYdEdFdGdHdLdZd[d\d]dddRd^d_d`df�ZAe1dadHdGdLf�ZBe1dbdcdddedfdgdhdidjdkdldmf�ZCidndd6dndj6dndl6dodf6dodg6eC_DGdpd�de,�ZEeEjdqejF�eEjdrejF�eEjdsejGe;�eEjdtejHe9�eEjduejIe9�eEjdvejJe9�eEjdwejKe9�eEjdxejLe:�eEjdyejMe<�eEjdzeeC�eEjd{ee@�eEjd|eNeA�eEjd2e6e>�eEjd4e7eB�eEjd0e5e=�eEjdod}e8d~eO�eEjdnd~eO�dS(uBaseManageruSyncManageru	BaseProxyuTokeniN(u
format_exc(uProcessucurrent_processuactive_childrenuPooluutilu
connection(uAuthenticationString(uPopenuForkingPickler(utimecCstj|j|j�ffS(N(uarrayutypecodeutobytes(ua((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyureduce_array sureduce_arraycCs(g|]}tti|����qS((utypeugetattr(u.0uname((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
<listcomp>$s	u
<listcomp>uitemsukeysuvaluescCstt|�ffS(N(ulist(uobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyurebuild_as_list&surebuild_as_listcBsP|EeZdZdZdZdd�Zdd�Zd	d
�Zdd�Zd
S(uTokenu4
    Type to uniquely indentify a shared object
    utypeiduaddressuidcCs!||||_|_|_dS(N(utypeiduaddressuid(uselfutypeiduaddressuid((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__7suToken.__init__cCs|j|j|jfS(N(utypeiduaddressuid(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__getstate__:suToken.__getstate__cCs|\|_|_|_dS(N(utypeiduaddressuid(uselfustate((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__setstate__=suToken.__setstate__cCsd|j|j|jfS(Nu#Token(typeid=%r, address=%r, id=%r)(utypeiduaddressuid(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__repr__@suToken.__repr__N(utypeiduaddressuid(	u__name__u
__module__u__qualname__u__doc__u	__slots__u__init__u__getstate__u__setstate__u__repr__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuToken1scCsN|j||||f�|j�\}}|dkr;|St||��dS(uL
    Send a message to manager using connection `c` and return response
    u#RETURNN(usendurecvuconvert_to_error(ucuidu
methodnameuargsukwdsukinduresult((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyudispatchHs
udispatchcCs~|dkr|S|dkr>t|�tks4t�t|�S|dkrpt|�tksbt�td|�Std�SdS(Nu#ERRORu
#TRACEBACKu#UNSERIALIZABLEuUnserializable message: %s
uUnrecognized message type(utypeustruAssertionErroruRemoteErroru
ValueError(ukinduresult((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuconvert_to_errorRs
uconvert_to_errorcBs |EeZdZdd�ZdS(uRemoteErrorcCs)ddddt|jd�ddS(Nu
u-iKi(ustruargs(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__str___suRemoteError.__str__N(u__name__u
__module__u__qualname__u__str__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuRemoteError^suRemoteErrorcCsLg}x?t|�D]1}t||�}t|�r|j|�qqW|S(u4
    Return a list of names of methods of `obj`
    (udirugetattrucallableuappend(uobjutempunameufunc((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuall_methodsfsuall_methodscCsdd�t|�D�S(uP
    Return a list of names of methods of `obj` which do not start with '_'
    cSs&g|]}|ddkr|�qS(iu_((u.0uname((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
<listcomp>us	u"public_methods.<locals>.<listcomp>(uall_methods(uobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyupublic_methodsqsupublic_methodsc	Bs"|EeZdZdZdddddddd	d
g	Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zied6ed6e
d6Z
dd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0S(1uServeruM
    Server class which runs in a process controlled by a manager object
    ushutdownucreateuaccept_connectionuget_methodsu
debug_infounumber_of_objectsudummyuincrefudecrefcCs�t|t�st�||_t|�|_t|\}}|d|dd�|_|jj|_idffd6|_
i|_tj
�|_dS(Nuaddressubacklogiu0(u
isinstanceubytesuAssertionErroruregistryuAuthenticationStringuauthkeyulistener_clientulisteneruaddressuNoneu	id_to_objuid_to_refcountu	threadinguRLockumutex(uselfuregistryuaddressuauthkeyu
serializeruListeneruClient((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�s		uServer.__init__cCs�tj�|_|t�_zqtjd|j�}d|_|j	�y*x#|jj
�sn|jjd�qLWWntt
fk
r�YnXWdtjtjkr�tjd�tjt_tjt_ntjd�XdS(u(
        Run the server forever
        utargetiNuresetting stdout, stderriT(u	threadinguEventu
stop_eventucurrent_processu_manager_serveruThreaduaccepteruTrueudaemonustartuis_setuwaituKeyboardInterruptu
SystemExitusysustdoutu
__stdout__uutiludebugu
__stderr__ustderruexit(uselfuaccepter((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
serve_forever�s 	
	
uServer.serve_foreverc
Cslxey|jj�}Wnttfk
r3wYnXtjd|jd|f�}d|_|j	�qdS(NutargetuargsT(
ulisteneruacceptuOSErroruIOErroru	threadinguThreaduhandle_requestuTrueudaemonustart(uselfucut((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuaccepter�s	uServer.accepterc'Cs�d}}}yvtj||j�tj||j�|j�}|\}}}}||jksttd|��t||�}Wn!t	k
r�dt
�f}	YnGXy||||�}Wn!t	k
r�dt
�f}	Yn
Xd|f}	y|j|	�Wn�t	k
r�}
zdy|jdt
�f�Wnt	k
rBYnXtj
d|	�tj
d|�tj
d|
�WYdd}
~
XnX|j�dS(u)
        Handle a new connection
        u%r unrecognizedu
#TRACEBACKu#RETURNuFailure to send message: %ru ... request was %ru ... exception was %rN(uNoneu
connectionudeliver_challengeuauthkeyuanswer_challengeurecvupublicuAssertionErrorugetattru	Exceptionu
format_excusenduutiluinfouclose(uselfucufuncnameuresulturequestuignoreuargsukwdsufuncumsgue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuhandle_request�s4


#uServer.handle_requestc*Cs+tjdtj�j�|j}|j}|j}x�|jj	�s&y/d}}|�}|\}}}	}
||\}}}||kr�td|t|�|f��nt
||�}
y|
|	|
�}Wn1tk
r}zd|f}WYdd}~XnpX|o|j|d�}|rh|j|||�\}}t||j|�}d||ff}nd|f}Wn�tk
r|dkr�dt�f}n\y8|j|}||||||	|
�}d|f}Wn!tk
r�dt�f}YnXYnXtk
r:tjdtj�j�tjd	�Yn!tk
rZdt�f}YnXyPy||�Wn;tk
r�}z|d
t|�f�WYdd}~XnXWq7tk
r"}zUtjdtj�j�tjd|�tjd
|�|j�tjd�WYdd}~Xq7Xq7WdS(uQ
        Handle requests from the proxies in a particular process/thread
        u$starting server thread to service %ru+method %r of %r object is not in exposed=%ru#ERRORNu#PROXYu#RETURNu
#TRACEBACKu$got EOF -- exiting thread serving %riu#UNSERIALIZABLEuexception in thread serving %ru ... message was %ru ... exception was %ri(uutiludebugu	threadingucurrent_threadunameurecvusendu	id_to_obju
stop_eventuis_setuNoneuAttributeErrorutypeugetattru	ExceptionugetucreateuTokenuaddressu
format_excufallback_mappinguEOFErrorusysuexiturepruinfouclose(uselfuconnurecvusendu	id_to_obju
methodnameuobjurequestuidentuargsukwdsuexposedu	gettypeidufunctionuresueumsgutypeiduridenturexposedutokenu
fallback_funcuresult((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuserve_client�sl				
	



	
-	
uServer.serve_clientcCs|S(N((uselfuconnuidentuobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyufallback_getvaluesuServer.fallback_getvaluecCs
t|�S(N(ustr(uselfuconnuidentuobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyufallback_strsuServer.fallback_strcCs
t|�S(N(urepr(uselfuconnuidentuobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
fallback_repr"suServer.fallback_repru__str__u__repr__u	#GETVALUEcCsdS(N((uselfuc((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyudummy+suServer.dummycCs�|jj�z�g}t|jj��}|j�xY|D]Q}|dkr<|jd||j|t|j|d�dd�f�q<q<Wdj	|�SWd|jj
�XdS(uO
        Return some info --- useful to spot problems with refcounting
        u0u  %s:       refcount=%s
    %siNiKu
(umutexuacquireulistu	id_to_objukeysusortuappenduid_to_refcountustrujoinurelease(uselfucuresultukeysuident((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
debug_info.s


	
-uServer.debug_infocCst|j�dS(u*
        Number of shared objects
        i(ulenu	id_to_obj(uselfuc((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyunumber_of_objects@suServer.number_of_objectscCsXzCytjd�|jd�Wnddl}|j�YnXWd|jj�XdS(u'
        Shutdown this process
        u!manager received shutdown messageu#RETURNiN(u#RETURNN(uutiludebugusenduNoneu	tracebacku	print_excu
stop_eventuset(uselfucu	traceback((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyushutdownFs
uServer.shutdowncOs\|jj�z:|j|\}}}}|dkrat|�dkrN|sTt�|d}	n|||�}	|dkr�t|	�}n|dk	r�t|�tks�t�t	|�t	|�}ndt
|	�}
tjd||
�|	t
|�|f|j|
<|
|jkr&d|j|
<n|j||
�|
t|�fSWd|jj�XdS(u>
        Create a new shared object and return its id
        iiu%xu&%r callable returned object with id %rN(umutexuacquireuregistryuNoneulenuAssertionErrorupublic_methodsutypeudictulistuiduutiludebugusetu	id_to_objuid_to_refcountuincrefutupleurelease(uselfucutypeiduargsukwdsucallableuexposedumethod_to_typeidu	proxytypeuobjuident((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyucreateSs(

u
Server.createcCst|j|jd�S(uL
        Return the methods of the shared object indicated by token
        i(utupleu	id_to_objuid(uselfucutoken((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuget_methodsysuServer.get_methodscCs-|tj�_|jd�|j|�dS(u=
        Spawn a new thread to serve this connection
        u#RETURNN(u#RETURNN(u	threadingucurrent_threadunameusenduNoneuserve_client(uselfucuname((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuaccept_connections
uServer.accept_connectionc
Cs7|jj�z|j|d7<Wd|jj�XdS(Ni(umutexuacquireuid_to_refcounturelease(uselfucuident((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuincref�s
u
Server.increfc
Cs�|jj�zh|j|dks)t�|j|d8<|j|dkrt|j|=|j|=tjd|�nWd|jj�XdS(Niiudisposing of obj with id %r(umutexuacquireuid_to_refcountuAssertionErroru	id_to_objuutiludebugurelease(uselfucuident((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyudecref�s
u
Server.decrefN(u__name__u
__module__u__qualname__u__doc__upublicu__init__u
serve_foreveruaccepteruhandle_requestuserve_clientufallback_getvalueufallback_stru
fallback_reprufallback_mappingudummyu
debug_infounumber_of_objectsushutdownucreateuget_methodsuaccept_connectionuincrefudecref(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuServer{s0
"J

&uServercBs/|EeZdZdgZdZdZdZdS(uStateuvalueiiiN(u__name__u
__module__u__qualname__u	__slots__uINITIALuSTARTEDuSHUTDOWN(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuState�s	uStateupickleu	xmlrpclibcBs
|EeZdZdZiZeZddddd�Zdd�Z	dd�Z
dfd	d
�Zedfdd��Z
d
d�Zddd�Zdd�Zdd�Zdd�Zdd�Zedd��Zedd��Zeddddd dd��ZdS(!uBaseManageru!
    Base class for managers
    upicklecCsq|dkrt�j}n||_t|�|_t�|_tj|j_	||_
t|\|_|_
dS(N(uNoneucurrent_processuauthkeyu_addressuAuthenticationStringu_authkeyuStateu_stateuINITIALuvalueu_serializerulistener_clientu	_Listeneru_Client(uselfuaddressuauthkeyu
serializer((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�s		uBaseManager.__init__cCs:|jjtjkst�t|j|j|j|j	�S(uX
        Return server object with serve_forever() method and address attribute
        (
u_stateuvalueuStateuINITIALuAssertionErroruServeru	_registryu_addressu_authkeyu_serializer(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
get_server�suBaseManager.get_servercCsNt|j\}}||jd|j�}t|dd�tj|j_	dS(u>
        Connect manager object to the server process
        uauthkeyudummyN(
ulistener_clientu_serializeru_addressu_authkeyudispatchuNoneuStateuSTARTEDu_stateuvalue(uselfuListeneruClientuconn((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuconnect�suBaseManager.connectcCsg|jjtjkst�|dk	rCt|�rCtd��ntj	dd�\}}tdt|�j
d|j|j|j|j|||f�|_djdd�|jjD��}t|�jd||j_|jj�|j�|j�|_|j�tj|j_tj|t|�jd|j|j|j|j|jfd	d
�|_dS(
u@
        Spawn a server process for this manager object
        uinitializer must be a callableuduplexutargetuargsu:css|]}t|�VqdS(N(ustr(u.0ui((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	<genexpr>�su$BaseManager.start.<locals>.<genexpr>u-uexitpriorityiNF( u_stateuvalueuStateuINITIALuAssertionErroruNoneucallableu	TypeErroru
connectionuPipeuFalseuProcessutypeu_run_serveru	_registryu_addressu_authkeyu_serializeru_processujoinu	_identityu__name__unameustartucloseurecvuSTARTEDuutiluFinalizeu_finalize_manageru_Clientushutdown(uselfuinitializeruinitargsureaderuwriteruident((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyustart�s("


uBaseManager.startc	Csl|dk	r||�n|j||||�}|j|j�|j�tjd|j�|j�dS(u@
        Create a server, report its address and run it
        umanager serving at %rN(uNoneu_Serverusenduaddressucloseuutiluinfou
serve_forever(	uclsuregistryuaddressuauthkeyu
serializeruwriteruinitializeruinitargsuserver((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_run_server�s

uBaseManager._run_servercOs�|jjtjks!td��|j|jd|j�}z)t|dd|f||�\}}Wd|j
�Xt||j|�|fS(uP
        Create a new shared object; return the token and exposed tuple
        userver not yet starteduauthkeyucreateN(u_stateuvalueuStateuSTARTEDuAssertionErroru_Clientu_addressu_authkeyudispatchuNoneucloseuToken(uselfutypeiduargsukwdsuconnuiduexposed((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_create
s!)uBaseManager._createcCsA|jdk	r=|jj|�|jj�s=d|_q=ndS(uC
        Join the manager process (if it has been spawned)
        N(u_processuNoneujoinuis_alive(uselfutimeout((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyujoinsuBaseManager.joinc
CsA|j|jd|j�}zt|dd�SWd|j�XdS(uS
        Return some info about the servers shared objects and connections
        uauthkeyu
debug_infoN(u_Clientu_addressu_authkeyudispatchuNoneuclose(uselfuconn((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_debug_infosuBaseManager._debug_infoc
CsA|j|jd|j�}zt|dd�SWd|j�XdS(u5
        Return the number of shared objects
        uauthkeyunumber_of_objectsN(u_Clientu_addressu_authkeyudispatchuNoneuclose(uselfuconn((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_number_of_objects)suBaseManager._number_of_objectscCsA|jjtjkr"|j�n|jjtjks=t�|S(N(u_stateuvalueuStateuINITIALustartuSTARTEDuAssertionError(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	__enter__3s
uBaseManager.__enter__cCs|j�dS(N(ushutdown(uselfuexc_typeuexc_valuexc_tb((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__exit__9suBaseManager.__exit__cCs|j�r�tjd�y8||d|�}zt|dd�Wd|j�XWntk
reYnX|jdd�|j�r�tjd�t|d�r�tjd	�|j	�|jdd
�|j�r�tjd�q�q�q�nt
j|_yt
j|=Wntk
rYnXdS(uQ
        Shutdown the manager process; will be registered as a finalizer
        u#sending shutdown message to manageruauthkeyushutdownNutimeoutg�?umanager still aliveu	terminateu'trying to `terminate()` manager processg�������?u#manager still alive after terminate(uis_aliveuutiluinfoudispatchuNoneucloseu	Exceptionujoinuhasattru	terminateuStateuSHUTDOWNuvalueu	BaseProxyu_address_to_localuKeyError(uprocessuaddressuauthkeyustateu_Clientuconn((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_finalize_manager<s.





uBaseManager._finalize_managercCs|jS(N(u_address(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu<lambda>\suBaseManager.<lambda>c
s-d|jkr$|jj�|_n�dkr9t�n|pNt�dd�}|pft�dd�}|r�xgt|j��D]P\}}t|�t	ks�t
d|��t|�t	ks�t
d|��q�Wn|||�f|j�<|r)��fdd�}	�|	_t|�|	�ndS(u9
        Register a typeid with the manager type
        u	_registryu	_exposed_u_method_to_typeid_u%r is not a stringc	s�tjd��|j�||�\}}�||jd|d|jd|�}|j|jd|j�}t|dd|j	f�|S(Nu)requesting creation of a shared %r objectumanageruauthkeyuexposedudecref(
uutiludebugu_createu_serializeru_authkeyu_ClientuaddressudispatchuNoneuid(uselfuargsukwdsutokenuexpuproxyuconn(u	proxytypeutypeid(u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyutempysu"BaseManager.register.<locals>.tempN(
u__dict__u	_registryucopyuNoneu	AutoProxyugetattrulistuitemsutypeustruAssertionErroru__name__usetattr(
uclsutypeiducallableu	proxytypeuexposedumethod_to_typeidu
create_methodukeyuvalueutemp((u	proxytypeutypeidu=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuregister^s 	")
	uBaseManager.registerNT(u__name__u
__module__u__qualname__u__doc__u	_registryuServeru_ServeruNoneu__init__u
get_serveruconnectustartuclassmethodu_run_serveru_createujoinu_debug_infou_number_of_objectsu	__enter__u__exit__ustaticmethodu_finalize_managerupropertyuaddressuTrueuregister(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuBaseManager�s(
	$	

 	cBs,|EeZdZdd�Zdd�ZdS(uProcessLocalSetcCstj|dd��dS(NcSs
|j�S(N(uclear(uobj((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu<lambda>�su*ProcessLocalSet.__init__.<locals>.<lambda>(uutiluregister_after_fork(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�suProcessLocalSet.__init__cCst|�ffS(N(utype(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
__reduce__�suProcessLocalSet.__reduce__N(u__name__u
__module__u__qualname__u__init__u
__reduce__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuProcessLocalSet�suProcessLocalSetcBs�|EeZdZdZiZej�Zdddddd�Z
dd�Zfidd�Zdd	�Z
d
d�Zedd
��Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(u	BaseProxyu.
    A base for proxies of shared objects
    cCs;tjj�zPtjj|jd�}|dkr\tj�t	�f}|tj|j<nWdtjj
�X|d|_|d|_||_
|j
j|_||_||_t|d|_|dk	r�t|�|_n0|jdk	r|jj|_nt�j|_|r$|j�ntj|tj�dS(Nii(u	BaseProxyu_mutexuacquireu_address_to_localugetuaddressuNoneuutiluForkAwareLocaluProcessLocalSetureleaseu_tlsu_idsetu_tokenuidu_idu_manageru_serializerulistener_clientu_ClientuAuthenticationStringu_authkeyucurrent_processuauthkeyu_increfuregister_after_forku_after_fork(uselfutokenu
serializerumanageruauthkeyuexposeduincrefu	tls_idset((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�s,


			
uBaseProxy.__init__cCs�tjd�t�j}tj�jdkrH|dtj�j7}n|j|jjd|j	�}t
|dd|f�||j_
dS(Numaking connection to manageru
MainThreadu|uauthkeyuaccept_connection(uutiludebugucurrent_processunameu	threadingucurrent_threadu_Clientu_tokenuaddressu_authkeyudispatchuNoneu_tlsu
connection(uselfunameuconn((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_connect�s
uBaseProxy._connectcCsEy|jj}WnAtk
rStjdtj�j�|j�|jj}YnX|j	|j
|||f�|j�\}}|dkr�|S|dkr2|\}}|jj
|jd
}	|jj|_|	||jd|jd|jd|�}
|j|jd|j�}t|d	d|jf�|
St||��d	S(uW
        Try to call a method of the referrent and return a copy of the result
        u#thread %r does not own a connectionu#RETURNu#PROXYiumanageruauthkeyuexposedudecrefNi����(u_tlsu
connectionuAttributeErroruutiludebugu	threadingucurrent_threadunameu_connectusendu_idurecvu_manageru	_registryutypeidu_tokenuaddressu_serializeru_authkeyu_ClientudispatchuNoneuiduconvert_to_error(uselfu
methodnameuargsukwdsuconnukinduresultuexposedutokenu	proxytypeuproxy((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_callmethod�s,
	
uBaseProxy._callmethodcCs
|jd�S(u9
        Get a copy of the value of the referent
        u	#GETVALUE(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	_getvalue�suBaseProxy._getvaluecCs�|j|jjd|j�}t|dd|jf�tjd|jj	�|j
j|j�|jor|jj
}tj|tjd|j|j||j|j
|jfdd�|_dS(Nuauthkeyuincrefu	INCREF %ruargsuexitpriorityi
(u_Clientu_tokenuaddressu_authkeyudispatchuNoneu_iduutiludebuguidu_idsetuaddu_manageru_stateuFinalizeu	BaseProxyu_decrefu_tlsu_close(uselfuconnustate((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_incref�suBaseProxy._increfcCs
|j|j�|dks.|jtjkr�yEtjd|j�||jd|�}t	|dd|jf�Wq�t
k
r�}ztjd|�WYdd}~Xq�Xntjd|j�|rt|d�rtjdtj
�j�|jj�|`ndS(Nu	DECREF %ruauthkeyudecrefu... decref failed %su%DECREF %r -- manager already shutdownu
connectionu-thread %r has no more proxies so closing conn(udiscarduiduNoneuvalueuStateuSTARTEDuutiludebuguaddressudispatchu	Exceptionuhasattru	threadingucurrent_threadunameu
connectionuclose(utokenuauthkeyustateutlsuidsetu_Clientuconnue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_decref�s&	
uBaseProxy._decrefcCsTd|_y|j�Wn6tk
rO}ztjd|�WYdd}~XnXdS(Nuincref failed: %s(uNoneu_manageru_increfu	Exceptionuutiluinfo(uselfue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu_after_forks
	uBaseProxy._after_forkcCs�i}tj�r"|j|d<nt|dd�r]|j|d<tt|j|j	|ffStt
|�|j|j	|ffSdS(Nuauthkeyu_isautouexposedF(uPopenuthread_is_spawningu_authkeyugetattruFalseu	_exposed_uRebuildProxyu	AutoProxyu_tokenu_serializerutype(uselfukwds((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
__reduce__s
uBaseProxy.__reduce__cCs
|j�S(N(u	_getvalue(uselfumemo((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__deepcopy__,suBaseProxy.__deepcopy__cCs*dt|�j|jjdt|�fS(Nu<%s object, typeid %r at %s>u0x%x(utypeu__name__u_tokenutypeiduid(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__repr__/suBaseProxy.__repr__cCsBy|jd�SWn*tk
r=t|�dd�dSYnXdS(uV
        Return representation of the referent (or a fall-back if that fails)
        u__repr__Niu; '__str__()' failed>i����(u_callmethodu	Exceptionurepr(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__str__3s
uBaseProxy.__str__NT(u__name__u
__module__u__qualname__u__doc__u_address_to_localuutiluForkAwareThreadLocku_mutexuNoneuTrueu__init__u_connectu_callmethodu	_getvalueu_increfustaticmethodu_decrefu_after_forku
__reduce__u__deepcopy__u__repr__u__str__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	BaseProxy�s%	
cCs�tt�dd�}|r?|j|jkr?|j|jdS|jdd�odtt�dd�}|||d||�SdS(u�
    Function used for unpickling proxy objects.

    If possible the shared object is returned, or otherwise a proxy for it.
    u_manager_serveriuincrefu_inheritingNTF(	ugetattrucurrent_processuNoneuaddressu	id_to_objuidupopuTrueuFalse(ufuncutokenu
serializerukwdsuserveruincref((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuRebuildProxy@suRebuildProxyc
Cs�t|�}y|||fSWntk
r2YnXi}x%|D]}td||f|�q@Wt|tf|�}||_||||f<|S(uC
    Return an proxy type whose methods are given by `exposed`
    uLdef %s(self, *args, **kwds):
        return self._callmethod(%r, args, kwds)(utupleuKeyErroruexecutypeu	BaseProxyu	_exposed_(unameuexposedu_cacheudicumethu	ProxyType((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
MakeProxyTypeUs

	u
MakeProxyTypec
Cs�t|d}|dkr\||jd|�}zt|dd|f�}Wd|j�Xn|dkr�|dk	r�|j}n|dkr�t�j}ntd|j	|�}|||d|d|d|�}	d|	_|	S(	u*
    Return an auto-proxy for `token`
    iuauthkeyuget_methodsNu
AutoProxy[%s]umanageruincrefT(ulistener_clientuNoneuaddressudispatchucloseu_authkeyucurrent_processuauthkeyu
MakeProxyTypeutypeiduTrueu_isauto(
utokenu
serializerumanageruauthkeyuexposeduincrefu_Clientuconnu	ProxyTypeuproxy((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	AutoProxyks		u	AutoProxycBs,|EeZdZdd�Zdd�ZdS(u	NamespacecKs|jj|�dS(N(u__dict__uupdate(uselfukwds((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�suNamespace.__init__cCsyt|jj��}g}x=|D]5\}}|jd�s"|jd||f�q"q"W|j�dtjd|�S(Nu_u%s=%ru
Namespace(%s)u, (ulistu__dict__uitemsu
startswithuappendusortustrujoin(uselfuitemsutempunameuvalue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__repr__�s
uNamespace.__repr__N(u__name__u
__module__u__qualname__u__init__u__repr__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	Namespace�su	NamespacecBsV|EeZdZd
dd�Zdd�Zdd�Zdd�Zeee�Z	d	S(uValuecCs||_||_dS(N(u	_typecodeu_value(uselfutypecodeuvalueulock((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__init__�s	uValue.__init__cCs|jS(N(u_value(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuget�su	Value.getcCs
||_dS(N(u_value(uselfuvalue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuset�su	Value.setcCs dt|�j|j|jfS(Nu
%s(%r, %r)(utypeu__name__u	_typecodeu_value(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__repr__�suValue.__repr__NT(
u__name__u
__module__u__qualname__uTrueu__init__ugetusetu__repr__upropertyuvalue(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuValue�s
uValuecCstj||�S(N(uarray(utypecodeusequenceulock((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuArray�suArraycBsV|EeZdZdZdd�Zdd�Zd	d
�Zdd�Zd
d�ZdS(u
IteratorProxyu__next__usenduthrowuclosecCs|S(N((uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__iter__�suIteratorProxy.__iter__cGs|jd|�S(Nu__next__(u_callmethod(uselfuargs((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__next__�suIteratorProxy.__next__cGs|jd|�S(Nusend(u_callmethod(uselfuargs((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyusend�suIteratorProxy.sendcGs|jd|�S(Nuthrow(u_callmethod(uselfuargs((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuthrow�suIteratorProxy.throwcGs|jd|�S(Nuclose(u_callmethod(uselfuargs((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuclose�suIteratorProxy.closeN(u__next__usenduthrowuclose(	u__name__u
__module__u__qualname__u	_exposed_u__iter__u__next__usenduthrowuclose(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
IteratorProxy�su
IteratorProxycBsP|EeZdZdZd
ddd�Zdd�Zdd�Zd	d
�Z	dS(u
AcquirerProxyuacquireureleasecCs1|dkr|fn	||f}|jd|�S(Nuacquire(uNoneu_callmethod(uselfublockingutimeoutuargs((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuacquire�s!uAcquirerProxy.acquirecCs
|jd�S(Nurelease(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyurelease�suAcquirerProxy.releasecCs
|jd�S(Nuacquire(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	__enter__�suAcquirerProxy.__enter__cCs
|jd�S(Nurelease(u_callmethod(uselfuexc_typeuexc_valuexc_tb((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__exit__�suAcquirerProxy.__exit__N(uacquireureleaseT(
u__name__u
__module__u__qualname__u	_exposed_uTrueuNoneuacquireureleaseu	__enter__u__exit__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
AcquirerProxy�s
u
AcquirerProxycBsP|EeZdZdZddd�Zdd	�Zd
d�Zddd
�ZdS(uConditionProxyuacquireureleaseuwaitunotifyu
notify_allcCs|jd|f�S(Nuwait(u_callmethod(uselfutimeout((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuwait�suConditionProxy.waitcCs
|jd�S(Nunotify(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyunotify�suConditionProxy.notifycCs
|jd�S(Nu
notify_all(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
notify_all�suConditionProxy.notify_allcCs�|�}|r|S|dk	r/t�|}nd}d}xL|s�|dk	rp|t�}|dkrpPqpn|j|�|�}q>W|S(Ni(uNoneu_timeuwait(uselfu	predicateutimeouturesultuendtimeuwaittime((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuwait_for�s		


uConditionProxy.wait_forN(uacquireureleaseuwaitunotifyu
notify_all(	u__name__u
__module__u__qualname__u	_exposed_uNoneuwaitunotifyu
notify_alluwait_for(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuConditionProxy�s
uConditionProxycBsM|EeZdZdZdd�Zdd�Zd	d
�Zd
dd�Zd
S(u
EventProxyuis_setusetuclearuwaitcCs
|jd�S(Nuis_set(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuis_set�suEventProxy.is_setcCs
|jd�S(Nuset(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuset�suEventProxy.setcCs
|jd�S(Nuclear(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuclear�suEventProxy.clearcCs|jd|f�S(Nuwait(u_callmethod(uselfutimeout((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuwait�suEventProxy.waitN(uis_setusetuclearuwait(	u__name__u
__module__u__qualname__u	_exposed_uis_setusetuclearuNoneuwait(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
EventProxy�s
u
EventProxycBsw|EeZdZdZddd�Zdd�Zd	d
�Zedd��Z	ed
d��Z
edd��ZdS(uBarrierProxyu__getattribute__uwaituaborturesetcCs|jd|f�S(Nuwait(u_callmethod(uselfutimeout((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuwait�suBarrierProxy.waitcCs
|jd�S(Nuabort(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuabort�suBarrierProxy.abortcCs
|jd�S(Nureset(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyureset�suBarrierProxy.resetcCs|jdd�S(Nu__getattribute__uparties(uparties(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuparties�suBarrierProxy.partiescCs|jdd�S(Nu__getattribute__u	n_waiting(u	n_waiting(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	n_waiting�suBarrierProxy.n_waitingcCs|jdd�S(Nu__getattribute__ubroken(ubroken(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyubroken�suBarrierProxy.brokenN(u__getattribute__uwaituabortureset(u__name__u
__module__u__qualname__u	_exposed_uNoneuwaituaborturesetupropertyupartiesu	n_waitingubroken(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuBarrierProxy�suBarrierProxycBs>|EeZdZdZdd�Zdd�Zdd	�Zd
S(uNamespaceProxyu__getattribute__u__setattr__u__delattr__cCsB|ddkr tj||�Stj|d�}|d|f�S(Niu_u_callmethodu__getattribute__(uobjectu__getattribute__(uselfukeyu
callmethod((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__getattr__�suNamespaceProxy.__getattr__cCsH|ddkr#tj|||�Stj|d�}|d||f�S(Niu_u_callmethodu__setattr__(uobjectu__setattr__u__getattribute__(uselfukeyuvalueu
callmethod((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__setattr__suNamespaceProxy.__setattr__cCsB|ddkr tj||�Stj|d�}|d|f�S(Niu_u_callmethodu__delattr__(uobjectu__delattr__u__getattribute__(uselfukeyu
callmethod((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__delattr__suNamespaceProxy.__delattr__N(u__getattribute__u__setattr__u__delattr__(u__name__u
__module__u__qualname__u	_exposed_u__getattr__u__setattr__u__delattr__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuNamespaceProxy�suNamespaceProxycBsA|EeZdZdZdd�Zdd�Zeee�ZdS(	u
ValueProxyugetusetcCs
|jd�S(Nuget(u_callmethod(uself((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyugetsuValueProxy.getcCs|jd|f�S(Nuset(u_callmethod(uselfuvalue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyusetsuValueProxy.setN(ugetuset(u__name__u
__module__u__qualname__u	_exposed_ugetusetupropertyuvalue(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu
ValueProxysu
ValueProxyu
BaseListProxyu__add__u__contains__u__delitem__u__getitem__u__len__u__mul__u__reversed__u__rmul__u__setitem__uappenducountuextenduindexuinsertupopuremoveureverseusortu__imul__cBs,|EeZdZdd�Zdd�ZdS(u	ListProxycCs|jd|f�|S(Nuextend(u_callmethod(uselfuvalue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__iadd__suListProxy.__iadd__cCs|jd|f�|S(Nu__imul__(u_callmethod(uselfuvalue((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu__imul__"suListProxy.__imul__N(u__name__u
__module__u__qualname__u__iadd__u__imul__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu	ListProxysu	ListProxyu	DictProxyuclearucopyugetuhas_keyupopitemu
setdefaultuupdateu
ArrayProxyu	PoolProxyuapplyuapply_asyncucloseuimapuimap_unorderedujoinumapu	map_asyncustarmapu
starmap_asyncu	terminateuAsyncResultuIteratorcBs|EeZdZdZdS(uSyncManageru(
    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(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyuSyncManagerCs	uQueueu
JoinableQueueuEventuLockuRLocku	SemaphoreuBoundedSemaphoreu	ConditionuBarrieruPoolulistudictu	proxytypeu
create_method(Pu__all__usysu	threadinguarrayuqueueu	tracebacku
format_excumultiprocessinguProcessucurrent_processuactive_childrenuPooluutilu
connectionumultiprocessing.processuAuthenticationStringumultiprocessing.forkinguPopenuForkingPicklerutimeu_timeureduce_arrayuregisteru
view_typesulisturebuild_as_listu	view_typeucopyregupickleuobjectuTokenudispatchuconvert_to_erroru	ExceptionuRemoteErroruall_methodsupublic_methodsuServeruStateuListeneruClientuXmlListeneru	XmlClientulistener_clientuBaseManagerusetuProcessLocalSetu	BaseProxyuRebuildProxyu
MakeProxyTypeuNoneuTrueu	AutoProxyu	NamespaceuValueuArrayu
IteratorProxyu
AcquirerProxyuConditionProxyu
EventProxyuBarrierProxyuNamespaceProxyu
ValueProxyu
BaseListProxyu	ListProxyu	DictProxyu
ArrayProxyu	PoolProxyu_method_to_typeid_uSyncManageruQueueuEventuLockuRLocku	SemaphoreuBoundedSemaphoreu	ConditionuBarrierudictuFalse(((u=/opt/alt/python33/lib64/python3.3/multiprocessing/managers.pyu<module>s�.


�#
�
�
		


?>