HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/multiprocessing/__pycache__/context.cpython-310.opt-2.pyc
o

�iM-�@s�ddlZddlZddlZddlmZddlmZdZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
Gdd
�d
e�ZGdd�de�Z
Gdd�dej�ZGdd�de
�Zejdkr�Gdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�de
�ZGdd�de
�ZGdd �d e
�Ze�e�e�d!�Zejd"kr�eed#�Zn#eed$�ZnGd%d�dej�ZGd&d�de
�Zd#e�iZeed#�Zd'd(�Ze��Zd)d*�Zd+d,�Zd-d.�ZdS)/�N�)�process)�	reduction�c@�eZdZdS)�ProcessErrorN��__name__�
__module__�__qualname__rrr�4/usr/local/lib/python3.10/multiprocessing/context.pyr�rc@r)�BufferTooShortNrrrrrrr
rc@r)�TimeoutErrorNrrrrrrr
rc@r)�AuthenticationErrorNrrrrrrr
rc@s\eZdZeZeZeZeZeej	�Z	eej
�Z
eej�Zdd�Zdd�Z
dCdd�Zdd	�Zd
d�ZdDd
d�ZdEdd�ZdEdd�Zdd�ZdFdd�ZdGdd�ZdGdd�Zdd�Z		dHd d!�Zd"d#�Zd$d%�Zdd&�d'd(�Zdd&�d)d*�Zd+d,�Zd-d.�ZdDd/d0�Z d1d2�Z!d3d4�Z"d5d6�Z#dDd7d8�Z$dId:d;�Z%dId<d=�Z&e'd>d?��Z(e(j)d@d?��Z(dAdB�Z*dS)J�BaseContextcCs	t��}|dur
td��|S)Nzcannot determine number of cpus)�os�	cpu_count�NotImplementedError)�self�numrrrr)s
zBaseContext.cpu_countcCs(	ddlm}||��d�}|��|S)Nr)�SyncManager��ctx)�managersr�get_context�start)rr�mrrr�Manager1s
zBaseContext.ManagerTcC�	ddlm}||�S)Nr)�Pipe)�
connectionr )r�duplexr rrrr <�zBaseContext.PipecC�	ddlm}||��d�S)Nr)�Lockr)�synchronizer%r)rr%rrrr%A�zBaseContext.LockcCr$)Nr)�RLockr)r&r(r)rr(rrrr(Fr'zBaseContext.RLockNcC�	ddlm}|||��d�S)Nr)�	Conditionr)r&r*r)r�lockr*rrrr*K�zBaseContext.ConditionrcCr))Nr)�	Semaphorer)r&r-r)r�valuer-rrrr-Pr,zBaseContext.SemaphorecCr))Nr)�BoundedSemaphorer)r&r/r)rr.r/rrrr/Ur,zBaseContext.BoundedSemaphorecCr$)Nr)�Eventr)r&r0r)rr0rrrr0Zr'zBaseContext.EventcC�"	ddlm}|||||��d�S)Nr)�Barrierr)r&r2r)r�parties�action�timeoutr2rrrr2_szBaseContext.BarrierrcCr))Nr)�Queuer)�queuesr6r)r�maxsizer6rrrr6dr,zBaseContext.QueuecCr))Nr)�
JoinableQueuer)r7r9r)rr8r9rrrr9ir,zBaseContext.JoinableQueuecCr$)Nr)�SimpleQueuer)r7r:r)rr:rrrr:nr'zBaseContext.SimpleQueuercCs$	ddlm}||||||��d�S)Nr)�Pool)�context)�poolr;r)r�	processes�initializer�initargs�maxtasksperchildr;rrrr;ss

�zBaseContext.PoolcGs	ddlm}||g|�R�S)Nr)�RawValue)�sharedctypesrB)r�typecode_or_type�argsrBrrrrBzr,zBaseContext.RawValuecCs	ddlm}|||�S)Nr)�RawArray)rCrF)rrD�size_or_initializerrFrrrrFs
zBaseContext.RawArray)r+cGs*	ddlm}||g|�R||��d��S)Nr)�Value�r+r)rCrHr)rrDr+rErHrrrrH�s
�zBaseContext.ValuecCr1)Nr)�ArrayrI)rCrJr)rrDrGr+rJrrrrJ�s
�zBaseContext.ArraycCs6	tjdkrttdd�rddlm}|�dSdSdS)N�win32�frozenFr)�freeze_support)�sys�platform�getattr�spawnrM)rrMrrrrM�s

�zBaseContext.freeze_supportcCs	ddlm}|�S)Nr)�
get_logger)�utilrR)rrRrrrrR�szBaseContext.get_loggercCr)Nr)�
log_to_stderr)rSrT)r�levelrTrrrrT�r#zBaseContext.log_to_stderrcCs	ddlm}dS)Nr)r!)�r!)rr!rrr�allow_connection_pickling�sz%BaseContext.allow_connection_picklingcC�	ddlm}||�dS)Nr)�set_executable)rQrY)r�
executablerYrrrrY�szBaseContext.set_executablecCrX)Nr)�set_forkserver_preload)�
forkserverr[)r�module_namesr[rrrr[�sz"BaseContext.set_forkserver_preloadcCsB|dur|Szt|}Wntytd|�d�w|��|S)Nzcannot find context for %r)�_concrete_contexts�KeyError�
ValueError�_check_available)r�methodrrrrr�s�zBaseContext.get_contextFcCs|jS�N)�_name�r�
allow_nonerrr�get_start_method�szBaseContext.get_start_methodcCstd��)Nz+cannot set start method of concrete context)r`�rrb�forcerrr�set_start_method�szBaseContext.set_start_methodcCs	t��d�S�Nr)�globals�get�rrrr�reducer�szBaseContext.reducercCs|t�d<dSrk)rl)rrrrrro��cC�dSrcrrnrrrra�szBaseContext._check_available)Trc)r)NN)r)NNrN�F)+r	r
rrrrr�staticmethodr�current_process�parent_process�active_childrenrrr r%r(r*r-r/r0r2r6r9r:r;rBrFrHrJrMrRrTrWrYr[rrgrj�propertyro�setterrarrrrrsT










�






rc@s(eZdZdZedd��Zedd��ZdS)�ProcessNcCst��j�|�Src)�_default_contextrry�_Popen)�process_objrrrr{�szProcess._PopencCst��j��Src)rzrry�_after_forkrrrrr}�rpzProcess._after_fork�r	r
r�
_start_methodrsr{r}rrrrry�s
rycsFeZdZeZdd�Zd
�fdd�	Zddd�Zdd	d
�Zdd�Z�Z	S)�DefaultContextcCs||_d|_dSrc)rz�_actual_context)rr<rrr�__init__�s
zDefaultContext.__init__Ncs,|dur|jdur
|j|_|jSt��|�Src)r�rz�superr)rrb��	__class__rrr�s

zDefaultContext.get_contextFcCs<|jdur|std��|dur|rd|_dS|�|�|_dS)Nzcontext has already been set)r��RuntimeErrorrrhrrrrj�szDefaultContext.set_start_methodcCs"|jdur
|r	dS|j|_|jjSrc)r�rzrdrerrrrg�s

zDefaultContext.get_start_methodcCs>tjdkrdgStjdkrddgnddg}tjr|�d�|S)NrKrQ�darwin�forkr\)rNrOr�HAVE_SEND_HANDLE�append)r�methodsrrr�get_all_start_methodss

z$DefaultContext.get_all_start_methodsrcrr)
r	r
rryr�rrjrgr��
__classcell__rrr�rr��s

r�rKc@�eZdZdZedd��ZdS)�ForkProcessr�cC�ddlm}||�S�Nr)�Popen)�
popen_forkr��r|r�rrrr{�zForkProcess._PopenN�r	r
rrrsr{rrrrr��r�c@�(eZdZdZedd��Zedd��ZdS)�SpawnProcessrQcCr�r�)�popen_spawn_posixr�r�rrrr{r��SpawnProcess._PopencCrqrcrrrrrr}"��SpawnProcess._after_forkNr~rrrrr��
r�c@r�)�ForkServerProcessr\cCr�r�)�popen_forkserverr�r�rrrr{)r�zForkServerProcess._PopenNr�rrrrr�'r�r�c@�eZdZdZeZdS)�ForkContextr�N)r	r
rrdr�ryrrrrr�.�r�c@r���SpawnContextrQN�r	r
rrdr�ryrrrrr�2r�r�c@seZdZdZeZdd�ZdS)�ForkServerContextr\cCstjstd��dS)Nz%forkserver start method not available)rr�r`rnrrrra9s�z"ForkServerContext._check_availableN)r	r
rrdr�ryrarrrrr�6sr�)r�rQr\r�rQr�c@r�)r�rQcCr�r�)Zpopen_spawn_win32r�r�rrrr{Mr�r�cCrqrcrrrrrr}Rr�r�Nr~rrrrr�Kr�c@r�r�r�rrrrr�Wr�cCst|t_dSrc)r^rzr�)rbrrr�_force_start_methoddsr�cCsttdd�S)N�spawning_popen)rP�_tlsrrrr�get_spawning_popenmsr�cCs
|t_dSrc)r�r�)�popenrrr�set_spawning_popenps
r�cCs t�durtdt|�j��dS)NzF%s objects should only be shared between processes through inheritance)r�r��typer	)�objrrr�assert_spawningss
���r�) rrN�	threadingrVrr�__all__�	Exceptionrrrr�objectr�BaseProcessryr�rOr�r�r�r�r�r�r^rzr��localr�r�r�r�rrrr�<module>sL?

,�
�