AlkantarClanX12

Your IP : 18.116.86.160


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

B

YI~d4)�@sdddgZddlZddlZddlZddlZddlZddlmZyej�	e�
��ZWnek
rjdZYnXdd�Z
dd�Zdd	�ZGd
d�de�ZGdd�de�ZGd
d�de�Ze�ae�d�ae�a[iZx<eej���D]*\ZZedd�dkr�dekr�eee<q�We�Z dS)�BaseProcess�current_process�active_children�N)�WeakSetcCstS)N)�_current_process�rr�</opt/alt/python37/lib64/python3.7/multiprocessing/process.pyr$scCst�tt�S)N)�_cleanup�list�	_childrenrrrrr*scCs.x(tt�D]}|j��dk	r
t�|�q
WdS)N)r
r�_popen�poll�discard)�prrrr	5sr	c@s�eZdZdd�Zddddifdd�dd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Z	d+dd�Z
dd�Zdd�Ze
dd��Zejdd��Ze
dd��Zejdd��Ze
dd��Zejd d��Ze
d!d"��Ze
d#d$��ZeZe
d%d&��Zd'd(�Zd)d*�ZdS),rcCst�dS)N)�NotImplementedError)�selfrrr�_PopenEszBaseProcess._PopenNr)�daemoncCs�tt�}tj|f|_tj��|_t��|_d|_	d|_
||_t|�|_
t|�|_|pxt|�jdd�dd�|jD��|_|dk	r�||_t�|�dS)NF�-�:css|]}t|�VqdS)N)�str)�.0�irrr�	<genexpr>Usz'BaseProcess.__init__.<locals>.<genexpr>)�next�_process_counterr�	_identity�_config�copy�os�getpid�_parent_pidr�_closed�_target�tuple�_args�dict�_kwargs�type�__name__�join�_namer�	_dangling�add)r�group�target�name�args�kwargsr�countrrr�__init__Hs


zBaseProcess.__init__cCs|jrtd��dS)Nzprocess object is closed)r"�
ValueError)rrrr�
_check_closedZszBaseProcess._check_closedcCs|jr|j|j|j�dS)N)r#r%r')rrrr�run^szBaseProcess.runcCs>|��t�|�|�|_|jj|_|`|`|`t	�
|�dS)N)r6r	rr�sentinel�	_sentinelr#r%r'rr-)rrrr�startes
zBaseProcess.startcCs|��|j��dS)N)r6r�	terminate)rrrrr;wszBaseProcess.terminatecCs|��|j��dS)N)r6r�kill)rrrrr<~szBaseProcess.killcCs*|��|j�|�}|dk	r&t�|�dS)N)r6r�waitrr)rZtimeoutZresrrrr*�szBaseProcess.joincCsJ|��|tkrdS|jdkr"dS|j��}|dkr8dSt�|�dSdS)NTF)r6rrr
rr)r�
returncoderrr�is_alive�s


zBaseProcess.is_alivecCsH|jdk	r>|j��dkr td��|j��d|_|`t�|�d|_dS)Nz^Cannot close a process while it is still running. You should first call join() or terminate().T)rr
r5�closer9rrr")rrrrr@�s


zBaseProcess.closecCs|jS)N)r+)rrrrr0�szBaseProcess.namecCs
||_dS)N)r+)rr0rrrr0�scCs|j�dd�S)NrF)r�get)rrrrr�szBaseProcess.daemoncCs||jd<dS)Nr)r)rZdaemonicrrrr�scCs
|jdS)N�authkey)r)rrrrrB�szBaseProcess.authkeycCst|�|jd<dS)NrB)�AuthenticationStringr)rrBrrrrB�scCs"|��|jdkr|jS|j��S)N)r6rr
)rrrr�exitcode�s
zBaseProcess.exitcodecCs*|��|tkrt��S|jo$|jjSdS)N)r6rrr r�pid)rrrr�ident�szBaseProcess.identcCs2|��y|jStk
r,td�d�YnXdS)Nzprocess not started)r6r9�AttributeErrorr5)rrrrr8�s
zBaseProcess.sentinelcCs�|tkrd}nJ|jrd}n>|jt��kr.d}n*|jdkr>d}n|j��dk	rT|j}nd}t|�t	kr�|dkrrd}ndt
�||�}dt|�j|j
||jr�d	p�d
fS)NZstarted�closed�unknown�initialrZstoppedzstopped[%s]z<%s(%s, %s%s)>z daemon�)rr"r!rr rr
rDr(�int�_exitcode_to_namerAr)r+r)r�statusrrr�__repr__�s"
zBaseProcess.__repr__c
CsRddlm}m}�zy||jdk	r,|�|j�t�d�at�a	|�
�t}|az|j�
�|��Wd~X|�d�z|��d}Wd|��XWn�tk
r�}zJ|js�d}n:t|jdt�r�|jd}ntj�t|jd�d�d}Wdd}~XYn2d}ddl}tj�d|j�|��YnXWdt��|�d|�|��X|S)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d) rKrQrRZ
_start_methodZ_force_start_method�	itertoolsr3r�setrZ_close_stdinrZ_finalizer_registry�clearZ_run_after_forkers�infor7Z_exit_function�
SystemExitr1�
isinstancerL�sys�stderr�writer�	tracebackr0�	print_exc�	threadingZ	_shutdownZ_flush_std_streams)rrQrRZold_processrD�er]rrr�
_bootstrapsD




zBaseProcess._bootstrap)N)r)�
__module__�__qualname__rr4r6r7r:r;r<r*r?r@�propertyr0�setterrrBrDrFrEr8rOrarrrrr?s.

c@seZdZdd�ZdS)rCcCs,ddlm}|�dkrtd��tt|�ffS)NrP)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rRrf�	TypeErrorrC�bytes)rrfrrr�
__reduce__Fs

zAuthenticationString.__reduce__N)r)rbrcrirrrrrCEsrCc@seZdZdd�Zdd�ZdS)�_MainProcesscCs8d|_d|_d|_d|_d|_tt�d��dd�|_dS)NrZMainProcessF� z/mp)rBZ	semprefix)	rr+r!rr"rCr�urandomr)rrrrr4Usz_MainProcess.__init__cCsdS)Nr)rrrrr@gsz_MainProcess.closeN)r)rbrcr4r@rrrrrjSsrjrP�ZSIG�_)!�__all__rrZ�signalrTr_Z_weakrefsetr�path�abspath�getcwdZORIGINAL_DIR�OSErrorrrr	�objectrrhrCrjrr3rrUrrMr
�__dict__�itemsr0Zsignumr,rrrr�<module>
s6