AlkantarClanX12

Your IP : 3.143.235.104


Current Path : /opt/alt/python27/lib64/python2.7/multiprocessing/
Upload File :
Current File : //opt/alt/python27/lib64/python2.7/multiprocessing/util.pyo

�
^
bc@s�ddlZddlZddlZddlZddlZddlmZddlmZm	Z	dddddd	d
ddd
ddddgZ
dZdZdZ
dZdZdZdZdaead�Zd�Zd�Zd�Zd�Zdd�Zd�Zej�Zej�Z d �Z!d!�Z"iZ#ej�Z$d
e%fd"��YZ&dd#�Z'd$�Z(ea)eee'e	ed%�Z*ej+e*�de%fd&��YZ,dej-fd'��YZ.dS((i����N(t_args_from_interpreter_flags(tcurrent_processtactive_childrent	sub_debugtdebugtinfotsub_warningt
get_loggert
log_to_stderrtget_temp_dirtregister_after_forkt
is_exitingtFinalizetForkAwareThreadLocktForkAwareLocaltSUBDEBUGt
SUBWARNINGiii
iitmultiprocessings+[%(levelname)s/%(processName)s] %(message)scGs trtjt||�ndS(N(t_loggertlogR(tmsgtargs((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRDscGs trtjt||�ndS(N(RRtDEBUG(RR((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRHscGs trtjt||�ndS(N(RRtINFO(RR((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRLscGs trtjt||�ndS(N(RRR(RR((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRPscCs�ddl}ddl}|j�z�ts�|jt�adt_|jtd�|jt	d�t
|d�r�|jt�|j
t�q�|jjtdif�|jjtdif�nWd|j�XtS(	s0
    Returns logger used by multiprocessing
    i����NiRRt
unregister(((tloggingtatexitt_acquireLockRt	getLoggertLOGGER_NAMEt	propagatetaddLevelNameRRthasattrRt_exit_functiontregistert
_exithandlerstremovetappendt_releaseLock(RR((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRTs
	
 cCsjddl}t�}|jt�}|j�}|j|�|j|�|r`|j|�nta	t
S(sB
    Turn on logging and add a handler which prints to stderr
    i����N(RRt	FormattertDEFAULT_LOGGING_FORMATt
StreamHandlertsetFormattert
addHandlertsetLeveltTruet_log_to_stderrR(tlevelRtloggert	formatterthandler((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRqs	

cCs�t�jdkrwddl}ddl}|jdd�}td|�td|jd|gdd�|t�_nt�jS(Ni����tprefixspymp-screated temp directory %sRtexitpriorityi����(	Rt_tempdirtNonetshutilttempfiletmkdtempRRtrmtree(R7R8ttempdir((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR	�s
cCsqttj��}|j�xN|D]F\\}}}}y||�Wq#tk
rh}td|�q#Xq#WdS(Ns after forker raised exception %s(tlistt_afterfork_registrytitemstsortt	ExceptionR(R>tindextidenttfunctobjte((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt_run_after_forkers�s
cCs#|ttj�t|�|f<dS(N(R=t_afterfork_countertnexttid(RDRC((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR
�scBsGeZdZdddd�Zdd�Zd�Zd�Zd�ZRS(sA
    Class which supports object finalization using weakrefs
    cCsz|dk	r$tj||�|_n||_||_|p?i|_|tj�f|_	t
j�|_|t
|j	<dS(N(R6tweakreftreft_weakreft	_callbackt_argst_kwargst_finalizer_counterRHt_keytostgetpidt_pidt_finalizer_registry(tselfRDtcallbackRtkwargsR4((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt__init__�s		cCs�yt|j=Wntk
r+td�n�X|jtj�krTtd�d}n4td|j|j	|j
�|j|j	|j
�}d|_|_|_	|_
|_|SdS(sQ
        Run the callback unless it has already been called or cancelled
        sfinalizer no longer registereds+finalizer ignored because different processs/finalizer calling %s with args %s and kwargs %sN(RURQtKeyErrorRRTRRRSR6RMRNRORL(RVtwrtres((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt__call__�s

	%cCsKyt|j=Wntk
r!n&Xd|_|_|_|_|_dS(s3
        Cancel finalization of the object
        N(RURQRZR6RLRMRNRO(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pytcancel�s

cCs
|jtkS(sS
        Return whether this finalizer is still waiting to invoke callback
        (RQRU(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pytstill_active�scCs�y|j�}Wnttfk
r/d}nX|dkr@dSdt|jd|j�}|jr|dt|j�7}n|jr�|dt|j�7}n|j	ddk	r�|dt|j	d�7}n|dS(	Ns<Finalize object, dead>s<Finalize object, callback=%st__name__s, args=s	, kwargs=is, exitprority=t>(
RLtAttributeErrort	TypeErrorR6tgetattrRMRNtstrRORQ(RVRDtx((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt__repr__�s
		(N(	R`t
__module__t__doc__R6RYR]R^R_Rg(((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR�s		cs�tdkrdS�dkr(d�}n�fd�}gtj�D]}||�rD|^qD}|jdt�xV|D]N\}}td|�y|�Wqytk
r�ddl}|j�qyXqyW�dkr�tj	�ndS(s�
    Run all finalizers whose exit priority is not None and at least minpriority

    Finalizers with highest priority are called first; finalizers with
    the same priority will be called in reverse order of creation.
    NcSs|dddk	S(Ni(R6(tp((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt<lambda>tcs&|dddk	o%|dd�kS(Ni(R6(Rj(tminpriority(s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRk
Rltreverses
calling %si����(
RUR6R>R?R-RR@t	tracebackt	print_exctclear(RmtfRfR>tkeyt	finalizerRo((Rms9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt_run_finalizers�s +

cCstptdkS(s6
    Returns true if the process is shutting down
    N(t_exitingR6(((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR!scCs�|d�|d�|d�|�dk	r�x:|�D]/}|jr7|d|j�|jj�q7q7Wx.|�D] }|d|j�|j�qtWn|d�|�dS(Nsprocess shutting downs2running all "atexit" finalizers with priority >= 0is!calling terminate() for daemon %sscalling join() for process %ss)running the remaining "atexit" finalizers(R6t	_daemonictnamet_popent	terminatetjoin(RRRuRRRj((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR!)s	


	
cBseZd�Zd�ZRS(cCs|j�t|tj�dS(N(t_resetR
R
(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRYTs
cCs1tj�|_|jj|_|jj|_dS(N(t	threadingtLockt_locktacquiretrelease(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR|Xs(R`RhRYR|(((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR
Ss	cBseZd�Zd�ZRS(cCst|d��dS(NcSs
|jj�S(N(t__dict__Rq(RD((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRk_Rl(R
(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyRY^scCst|�dfS(N((ttype(RV((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt
__reduce__`s(R`RhRYR�(((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyR]s	(/RRt	itertoolsRJRR}t
subprocessRtmultiprocessing.processRRt__all__tNOTSETRRRRRR(R6RtFalseR.RRRRRRR	tWeakValueDictionaryR=tcountRGRFR
RURPtobjectRRuRRvR!R"R
tlocalR(((s9/opt/alt/python27/lib64/python2.7/multiprocessing/util.pyt<module>#sT										N'		"