AlkantarClanX12

Your IP : 18.227.0.255


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

�
��f�"c
@sadddgZddlZddlZddlZddlZddlmZyejjej	��Z
Wnek
r�dZ
YnXdd�Z
dd�Zdd	�ZGd
d�de�ZGdd�de�ZGd
d�de�Ze�a[iZxSeejj��D]<\ZZedd�dkrdekreee<qqWe�ZdS(uProcessucurrent_processuactive_childreniN(uWeakSetcCstS(u@
    Return process object representing the current process
    (u_current_process(((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyucurrent_process#scCst�ttj�S(uN
    Return list of process objects corresponding to live child processes
    (u_cleanupulistu_current_processu	_children(((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuactive_children)scCsFx?ttj�D].}|jj�dk	rtjj|�qqWdS(N(ulistu_current_processu	_childrenu_popenupolluNoneudiscard(up((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu_cleanup4su_cleanupc	BsI|EeZdZdZd"Zdd"d"d"d"fidd�Zdd�Zdd�Zd	d
�Z	d"dd�Z
d
d�Zedd��Z
e
jdd��Z
edd��Zejdd��Zedd��Zejdd��Zedd��Zedd��ZeZedd��Zdd�Zd d!�Zd"S(#uProcessu�
    Process objects represent activity that is run in a separate process

    The class is analagous to `threading.Thread`
    udaemoncCs�|dkstd��ttj�}tj|f|_tj|_|dk	r^||_ntj|_tj|_t	j
�|_d|_||_
t|�|_t|�|_|p�t|�jddjdd�|jD��|_tj|�dS(Nu#group argument must be None for nowu-u:css|]}t|�VqdS(N(ustr(u.0ui((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu	<genexpr>Wsu#Process.__init__.<locals>.<genexpr>(uNoneuAssertionErrorunextu_current_processu_counteru	_identityu_authkeyu	_daemonicu_tempdiruosugetpidu_parent_pidu_popenu_targetutupleu_argsudictu_kwargsutypeu__name__ujoinu_nameu	_danglinguadd(uselfugrouputargetunameuargsukwargsudaemonucount((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu__init__Fs 		#uProcess.__init__cCs&|jr"|j|j|j�ndS(uQ
        Method to be run in sub-process; can be overridden in sub-class
        N(u_targetu_argsu_kwargs(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyurunZs	uProcess.runcCs�|jdkstd��|jtj�ks<td��tjsRtd��t�|j	dk	rt|j	}nddl
m}||�|_|jj|_
tjj|�dS(u%
        Start child process
        ucannot start a process twiceu:can only start a process object created by current processu3daemonic processes are not allowed to have childreni(uPopenN(u_popenuNoneuAssertionErroru_parent_piduosugetpidu_current_processu	_daemonicu_cleanupu_PopenuforkinguPopenusentinelu	_sentinelu	_childrenuadd(uselfuPopen((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyustartas	
	u
Process.startcCs|jj�dS(uT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N(u_popenu	terminate(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu	terminatessuProcess.terminatecCsq|jtj�ks!td��|jdk	s<td��|jj|�}|dk	rmtjj	|�ndS(u5
        Wait until child process terminates
        ucan only join a child processucan only join a started processN(
u_parent_piduosugetpiduAssertionErroru_popenuNoneuwaitu_current_processu	_childrenudiscard(uselfutimeoutures((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyujoinys
!uProcess.joincCsa|tkrdS|jtj�ks1td��|jdkrDdS|jj	�|jj
dkS(u1
        Return whether process is alive
        ucan only test a child processTNF(u_current_processuTrueu_parent_piduosugetpiduAssertionErroru_popenuNoneuFalseupollu
returncode(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuis_alive�s!
uProcess.is_alivecCs|jS(N(u_name(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuname�suProcess.namecCs(t|t�std��||_dS(Nuname must be a string(u
isinstanceustruAssertionErroru_name(uselfuname((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuname�scCs|jS(u4
        Return whether process is a daemon
        (u	_daemonic(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyudaemon�suProcess.daemoncCs(|jdkstd��||_dS(u1
        Set whether process is a daemon
        uprocess has already startedN(u_popenuNoneuAssertionErroru	_daemonic(uselfudaemonic((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyudaemon�scCs|jS(N(u_authkey(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuauthkey�suProcess.authkeycCst|�|_dS(u2
        Set authorization key of process
        N(uAuthenticationStringu_authkey(uselfuauthkey((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuauthkey�scCs#|jdkr|jS|jj�S(uM
        Return exit code of process or `None` if it has yet to stop
        N(u_popenuNoneupoll(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuexitcode�suProcess.exitcodecCs-|tkrtj�S|jo(|jjSdS(uU
        Return identifier (PID) of process or `None` if it has yet to start
        N(u_current_processuosugetpidu_popenupid(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuident�s
u
Process.identcCs0y|jSWntk
r+td��YnXdS(u{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        uprocess not startedN(u	_sentineluAttributeErroru
ValueError(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyusentinel�s
uProcess.sentinelcCs�|tkrd}n]|jtj�kr3d}n?|jdkrKd}n'|jj�dk	rl|j}nd}t|�t	kr�|dkr�d}q�dt
j||�}ndt|�j|j
||jr�dp�d	fS(
Nustarteduunknownuinitialiustoppedustopped[%s]u<%s(%s, %s%s)>u daemonu(u_current_processu_parent_piduosugetpidu_popenuNoneupolluexitcodeutypeuintu_exitcode_to_nameugetu__name__u_nameu	_daemonic(uselfustatus((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu__repr__�s				uProcess.__repr__c(Cs�ddlm}z�y�t�|_tjd�|_tjdk	r�y#tjj
�ttj
�t_Wq�ttfk
r�Yq�Xnt}|az|jj�|j�Wd~X|jd�z|j�d}Wd|j�XWn�tk
rh}zd|js	d}nMt|jdt�r/|jd}n'tjjt|jd�d�d}WYdd}~Xn;d}ddl}tjjd|j�|j �YnXWd|jd|�tj!j"�tjj"�X|S(Ni(uutilu child process calling self.run()iu
uProcess %s:
u process exiting with exitcode %d(#uuutilusetu	_childrenu	itertoolsucountu_counterusysustdinuNoneucloseuopenuosudevnulluOSErroru
ValueErroru_current_processu_finalizer_registryuclearu_run_after_forkersuinfourunu_exit_functionu
SystemExituargsu
isinstanceuintustderruwriteustru	tracebackunameu	print_excustdoutuflush(uselfuutiluold_processuexitcodeueu	traceback((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu
_bootstrap�sJ




		!
uProcess._bootstrapN(u__name__u
__module__u__qualname__u__doc__uNoneu_Popenu__init__urunustartu	terminateujoinuis_aliveupropertyunameusetterudaemonuauthkeyuexitcodeuidentupidusentinelu__repr__u
_bootstrap(u
__locals__((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuProcess>s*
	
cBs |EeZdZdd�ZdS(uAuthenticationStringcCs>ddlm}|j�s+td��ntt|�ffS(Ni(uPopenuJPickling an AuthenticationString object is disallowed for security reasons(uforkinguPopenuthread_is_spawningu	TypeErroruAuthenticationStringubytes(uselfuPopen((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu
__reduce__s
uAuthenticationString.__reduce__N(u__name__u
__module__u__qualname__u
__reduce__(u
__locals__((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyuAuthenticationStringsuAuthenticationStringcBs |EeZdZdd�ZdS(u_MainProcesscCspf|_d|_d|_d|_d|_tjd�|_	t
�|_tt
jd��|_d|_dS(NuMainProcessii F(u	_identityuFalseu	_daemonicu_nameuNoneu_parent_pidu_popenu	itertoolsucountu_counterusetu	_childrenuAuthenticationStringuosuurandomu_authkeyu_tempdir(uself((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu__init__.s					u_MainProcess.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu_MainProcess,su_MainProcessiuSIGu_(u__all__uosusysusignalu	itertoolsu_weakrefsetuWeakSetupathuabspathugetcwduORIGINAL_DIRuOSErroruNoneucurrent_processuactive_childrenu_cleanupuobjectuProcessubytesuAuthenticationStringu_MainProcessu_current_processu_exitcode_to_nameulistu__dict__uitemsunameusignumu	_dangling(((u</opt/alt/python33/lib64/python3.3/multiprocessing/process.pyu<module>
s,

�
	""