AlkantarClanX12

Your IP : 18.191.215.30


Current Path : /usr/lib64/python3.8/multiprocessing/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/multiprocessing/__pycache__/context.cpython-38.opt-2.pyc

U

e5d�+�@s�ddlZddlZddlZddlmZddlmZdZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
Gdd
�d
e�ZGdd�de�Z
Gdd�dej�ZGdd�de
�Zejdk�rRGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�de
�ZGdd�de
�ZGdd �d e
�Ze�e�e�d!�Zejd"k�rDeed#�Zneed$�Zn8Gd%d�dej�ZGd&d�de
�Zd#e�iZeed#�Zd'd(�Ze��Zd)d*�Zd+d,�Zd-d.�ZdS)/�N�)�process)�	reduction�c@seZdZdS)�ProcessErrorN��__name__�
__module__�__qualname__rrr�//usr/lib64/python3.8/multiprocessing/context.pyrsrc@seZdZdS)�BufferTooShortNrrrrrrsrc@seZdZdS)�TimeoutErrorNrrrrrr
sr
c@seZdZdS)�AuthenticationErrorNrrrrrrsrc@sXeZdZeZeZeZeZeej	�Z	eej
�Z
eej�Zdd�Zdd�Z
dCdd�Zdd	�Zd
d�ZdDd
d�ZdEdd�ZdFdd�Zdd�ZdGdd�ZdHdd�ZdIdd�Zdd�ZdJd d!�Zd"d#�Zd$d%�Zdd&�d'd(�Zdd&�d)d*�Zd+d,�Zd-d.�ZdKd/d0�Z d1d2�Z!d3d4�Z"d5d6�Z#dLd7d8�Z$dMd:d;�Z%dNd<d=�Z&e'd>d?��Z(e(j)d@d?��Z(dAdB�Z*dS)O�BaseContextcCs"t��}|dkrtd��n|SdS)Nzcannot determine number of cpus)�os�	cpu_count�NotImplementedError)�selfZnumrrrr)s
zBaseContext.cpu_countcCs&ddlm}||��d�}|��|S)Nr)�SyncManager��ctx)Zmanagersr�get_context�start)rr�mrrr�Manager1szBaseContext.ManagerTcCsddlm}||�S)Nr)�Pipe)�
connectionr)rZduplexrrrrr<szBaseContext.PipecCsddlm}||��d�S)Nr)�Lockr)�synchronizerr)rrrrrrAszBaseContext.LockcCsddlm}||��d�S)Nr)�RLockr)rrr)rrrrrrFszBaseContext.RLockNcCsddlm}|||��d�S)Nr)�	Conditionr)rr r)r�lockr rrrr KszBaseContext.ConditionrcCsddlm}|||��d�S)Nr)�	Semaphorer)rr"r)r�valuer"rrrr"PszBaseContext.SemaphorecCsddlm}|||��d�S)Nr)�BoundedSemaphorer)rr$r)rr#r$rrrr$UszBaseContext.BoundedSemaphorecCsddlm}||��d�S)Nr)�Eventr)rr%r)rr%rrrr%ZszBaseContext.EventcCs ddlm}|||||��d�S)Nr)�Barrierr)rr&r)rZparties�actionZtimeoutr&rrrr&_szBaseContext.BarrierrcCsddlm}|||��d�S)Nr)�Queuer)�queuesr(r)r�maxsizer(rrrr(dszBaseContext.QueuecCsddlm}|||��d�S)Nr)�
JoinableQueuer)r)r+r)rr*r+rrrr+iszBaseContext.JoinableQueuecCsddlm}||��d�S)Nr)�SimpleQueuer)r)r,r)rr,rrrr,nszBaseContext.SimpleQueuercCs"ddlm}||||||��d�S)Nr)�Pool)�context)Zpoolr-r)rZ	processesZinitializerZinitargsZmaxtasksperchildr-rrrr-ss
�zBaseContext.PoolcGsddlm}||f|��S)Nr)�RawValue)�sharedctypesr/)r�typecode_or_type�argsr/rrrr/zszBaseContext.RawValuecCsddlm}|||�S)Nr)�RawArray)r0r3)rr1�size_or_initializerr3rrrr3szBaseContext.RawArray)r!cGs&ddlm}||f|�||��d��S)Nr)�Value�r!r)r0r5r)rr1r!r2r5rrrr5�s�zBaseContext.ValuecCs ddlm}|||||��d�S)Nr)�Arrayr6)r0r7r)rr1r4r!r7rrrr7�s�zBaseContext.ArraycCs,tjdkr(ttdd�r(ddlm}|�dS)N�win32�frozenFr)�freeze_support)�sys�platform�getattr�spawnr:)rr:rrrr:�szBaseContext.freeze_supportcCsddlm}|�S)Nr)�
get_logger)�utilr?)rr?rrrr?�szBaseContext.get_loggercCsddlm}||�S)Nr)�
log_to_stderr)r@rA)r�levelrArrrrA�szBaseContext.log_to_stderrcCsddlm}dS)Nr)r)�r)rrrrr�allow_connection_pickling�sz%BaseContext.allow_connection_picklingcCsddlm}||�dS)Nr)�set_executable)r>rE)r�
executablerErrrrE�szBaseContext.set_executablecCsddlm}||�dS)Nr)�set_forkserver_preload)�
forkserverrG)rZmodule_namesrGrrrrG�sz"BaseContext.set_forkserver_preloadcCsH|dkr|Szt|}Wn"tk
r:td|�d�YnX|��|S)Nzcannot find context for %r)�_concrete_contexts�KeyError�
ValueError�_check_available)r�methodrrrrr�szBaseContext.get_contextFcCs|jS�N)�_name�rZ
allow_nonerrr�get_start_method�szBaseContext.get_start_methodcCstd��dS)Nz+cannot set start method of concrete context)rK�rrMZforcerrr�set_start_method�szBaseContext.set_start_methodcCst��d�S�Nr)�globals�get�rrrr�reducer�szBaseContext.reducercCs|t�d<dSrT)rU)rrrrrrX�scCsdSrNrrWrrrrL�szBaseContext._check_available)T)N)r)r)NN)r)r)NNrN)N)N)F)F)+rr	r
rrr
r�staticmethodrZcurrent_processZparent_processZactive_childrenrrrrrr r"r$r%r&r(r+r,r-r/r3r5r7r:r?rArDrErGrrQrS�propertyrX�setterrLrrrrrsR









�







rc@seZdZdZedd��ZdS)�ProcessNcCst��j�|�SrN)�_default_contextrr\�_Popen)�process_objrrrr^�szProcess._Popen�rr	r
Z
_start_methodrYr^rrrrr\�sr\csFeZdZeZdd�Zd
�fdd�	Zddd�Zdd	d
�Zdd�Z�Z	S)�DefaultContextcCs||_d|_dSrN)r]�_actual_context)rr.rrr�__init__�szDefaultContext.__init__Ncs0|dkr |jdkr|j|_|jSt��|�SdSrN)rbr]�superr)rrM��	__class__rrr�s

zDefaultContext.get_contextFcCs<|jdk	r|std��|dkr,|r,d|_dS|�|�|_dS)Nzcontext has already been set)rb�RuntimeErrorrrRrrrrS�szDefaultContext.set_start_methodcCs"|jdkr|rdS|j|_|jjSrN)rbr]rOrPrrrrQ�s

zDefaultContext.get_start_methodcCsBtjdkrdgStjdkr"ddgnddg}tjr:|�d�|SdS)Nr8r>�darwin�forkrH)r;r<r�HAVE_SEND_HANDLE�append)r�methodsrrr�get_all_start_methodss

z$DefaultContext.get_all_start_methods)N)F)F)
rr	r
r\rcrrSrQrm�
__classcell__rrrerra�s

rar8c@seZdZdZedd��ZdS)�ForkProcessricCsddlm}||�S�Nr)�Popen)Z
popen_forkrq�r_rqrrrr^szForkProcess._PopenNr`rrrrrosroc@seZdZdZedd��ZdS)�SpawnProcessr>cCsddlm}||�Srp)Zpopen_spawn_posixrqrrrrrr^s�SpawnProcess._PopenNr`rrrrrssrsc@seZdZdZedd��ZdS)�ForkServerProcessrHcCsddlm}||�Srp)Zpopen_forkserverrqrrrrrr^ szForkServerProcess._PopenNr`rrrrrusruc@seZdZdZeZdS)�ForkContextriN)rr	r
rOror\rrrrrv%srvc@seZdZdZeZdS��SpawnContextr>N�rr	r
rOrsr\rrrrrx)srxc@seZdZdZeZdd�ZdS)�ForkServerContextrHcCstjstd��dS)Nz%forkserver start method not available)rrjrKrWrrrrL0sz"ForkServerContext._check_availableN)rr	r
rOrur\rLrrrrrz-srz)rir>rHrhr>ric@seZdZdZedd��ZdS)rsr>cCsddlm}||�Srp)Zpopen_spawn_win32rqrrrrrr^DsrtNr`rrrrrsBsc@seZdZdZeZdSrwryrrrrrxIscCst|t_dSrN)rIr]rb)rMrrr�_force_start_methodVsr{cCsttdd�S)N�spawning_popen)r=�_tlsrrrr�get_spawning_popen_sr~cCs
|t_dSrN)r}r|)�popenrrr�set_spawning_popenbsr�cCs t�dkrtdt|�j��dS)NzF%s objects should only be shared between processes through inheritance)r~rg�typer)�objrrr�assert_spawninges
��r�) rr;Z	threadingrCrr�__all__�	Exceptionrrr
r�objectrZBaseProcessr\rar<rorsrurvrxrzrIr]r{Zlocalr}r~r�r�rrrr�<module>sL?,��