Your IP : 3.19.62.227


Current Path : /opt/alt/python313/lib64/python3.13/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/multiprocessing/__pycache__/context.cpython-313.pyc

�

*}g�-����SSKrSSKrSSKrSSKJr SSKJr Sr"SS\5r"SS	\5r	"S
S\5r
"SS
\5r"SS\5r
"SS\R5r"SS\
5r\R"S:wa�"SS\R5r"SS\R5r"SS\R5r"SS\
5r"SS\
5r"SS \
5r\"5\"5\"5S!.r\R"S":Xa\"\S#5rO@\"\S$5rO4"S%S\R5r"S&S\
5rS#\"50r\"\S#5rS'r\R6"5rS(rS)rS*rg)+�N�)�process)�	reduction�c��\rSrSrSrg)�ProcessError�rN��__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��>/opt/alt/python313/lib64/python3.13/multiprocessing/context.pyrr���rrc��\rSrSrSrg)�BufferTooShort�rNr
rrrrrrrrc��\rSrSrSrg)�TimeoutError�rNr
rrrrrrrrc��\rSrSrSrg)�AuthenticationError�rNr
rrrrrrrrc��\rSrSr\r\r\r\r\"\	R5r
\"\	R5r\"\	R5rSr
SrS$SjrSrSrS%S	jrS&S
jrS&SjrSrS'S
jrS(SjrS(SjrSrS)SjrSrSrSS.SjrSS.SjrSrSr S%Sjr!Sr"Sr#Sr$S%Sjr%S*Sjr&S*S jr'\(S!5r)\)RTS"5r)S#r+Sr,g)+�BaseContext�c�L�[R"5nUc[S5eU$)z(Returns the number of CPUs in the systemzcannot determine number of cpus)�os�	cpu_count�NotImplementedError)�self�nums  rr!�BaseContext.cpu_count)s#���l�l�n���;�%�&G�H�H��Jrc�Z�SSKJn U"UR5S9nUR5 U$)z�Returns a manager associated with a running server process

The managers methods such as `Lock()`, `Condition()` and `Queue()`
can be used to create shared objects.
r)�SyncManager��ctx)�managersr'�get_context�start)r#r'�ms   r�Manager�BaseContext.Manager1s(��	*��D�,�,�.�/��	���	��rTc��SSKJn U"U5$)z1Returns two connection object connected by a piper)�Pipe)�
connectionr1)r#�duplexr1s   rr1�BaseContext.Pipe<s��$��F�|�rc�6�SSKJn U"UR5S9$)z#Returns a non-recursive lock objectr)�Lockr()�synchronizer6r+)r#r6s  rr6�BaseContext.LockAs��%���(�(�*�+�+rc�6�SSKJn U"UR5S9$)zReturns a recursive lock objectr)�RLockr()r7r:r+)r#r:s  rr:�BaseContext.RLockF���&���)�)�+�,�,rNc�6�SSKJn U"XR5S9$)zReturns a condition objectr)�	Conditionr()r7r>r+)r#�lockr>s   rr>�BaseContext.ConditionKs��*���#3�#3�#5�6�6rc�6�SSKJn U"XR5S9$)zReturns a semaphore objectr)�	Semaphorer()r7rBr+)r#�valuerBs   rrB�BaseContext.SemaphorePs��*���$4�$4�$6�7�7rc�6�SSKJn U"XR5S9$)z"Returns a bounded semaphore objectr)�BoundedSemaphorer()r7rFr+)r#rCrFs   rrF�BaseContext.BoundedSemaphoreUs��1���+;�+;�+=�>�>rc�6�SSKJn U"UR5S9$)zReturns an event objectr)�Eventr()r7rIr+)r#rIs  rrI�BaseContext.EventZr<rc�8�SSKJn U"XX0R5S9$)zReturns a barrier objectr)�Barrierr()r7rLr+)r#�parties�action�timeoutrLs     rrL�BaseContext.Barrier_s��(��w��5E�5E�5G�H�Hrc�6�SSKJn U"XR5S9$)�Returns a queue objectr)�Queuer()�queuesrSr+)r#�maxsizerSs   rrS�BaseContext.Queueds��!��W�"2�"2�"4�5�5rc�6�SSKJn U"XR5S9$)rRr)�
JoinableQueuer()rTrXr+)r#rUrXs   rrX�BaseContext.JoinableQueueis��)��W�*:�*:�*<�=�=rc�6�SSKJn U"UR5S9$)rRr)�SimpleQueuer()rTr[r+)r#r[s  rr[�BaseContext.SimpleQueuens��'��t�/�/�1�2�2rrc�:�SSKJn U"XX4UR5S9$)zReturns a process pool objectr)�Pool)�context)�poolr^r+)r#�	processes�initializer�initargs�maxtasksperchildr^s      rr^�BaseContext.Poolss$��	��I�H� �,�,�.�0�	0rc� �SSKJn U"U/UQ76$)zReturns a shared objectr)�RawValue)�sharedctypesrg)r#�typecode_or_type�argsrgs    rrg�BaseContext.RawValuezs��*��(�0�4�0�0rc��SSKJn U"X5$)zReturns a shared arrayr)�RawArray)rhrm)r#ri�size_or_initializerrms    rrm�BaseContext.RawArrays��*��(�>�>r)r?c�D�SSKJn U"U/UQ7UUR5S.6$)z$Returns a synchronized shared objectr)�Value�r?r))rhrqr+)r#rir?rjrqs     rrq�BaseContext.Value�s/��'��%�-��-�4��)�)�+�-�	-rc�:�SSKJn U"XUUR5S9$)z#Returns a synchronized shared arrayr)�Arrayrr)rhrur+)r#rirnr?rus     rru�BaseContext.Array�s#��'��%���)�)�+�-�	-rc�v�[RS:Xa%[[SS5(aSSKJn U"5 ggg)z{Check whether this is a fake forked process in a frozen executable.
If so then run code specified by commandline and exit.
�win32�frozenFr)�freeze_supportN)�sys�platform�getattr�spawnrz)r#rzs  rrz�BaseContext.freeze_support�s0���<�<�7�"�w�s�H�e�'D�'D�-���(E�"rc��SSKJn U"5$)zJReturn package logger -- if it does not already exist then
it is created.
r)�
get_logger)�utilr�)r#r�s  rr��BaseContext.get_logger�s��	%��|�rc��SSKJn U"U5$)z8Turn on logging and add a handler which prints to stderrr)�
log_to_stderr)r�r�)r#�levelr�s   rr��BaseContext.log_to_stderr�s��'��U�#�#rc��SSKJn g)zFInstall support for sending connections and sockets
between processes
r)r2N)�r2)r#r2s  r�allow_connection_pickling�%BaseContext.allow_connection_pickling�s��	!rc� �SSKJn U"U5 g)z�Sets the path to a python.exe or pythonw.exe binary used to run
child processes instead of sys.executable when using the 'spawn'
start method.  Useful for people embedding Python.
r)�set_executableN)r~r�)r#�
executabler�s   rr��BaseContext.set_executable�s��
	*��z�"rc� �SSKJn U"U5 g)z[Set list of module names to try to load in forkserver process.
This is really just a hint.
r)�set_forkserver_preloadN)�
forkserverr�)r#�module_namesr�s   rr��"BaseContext.set_forkserver_preload�s��	7��|�,rc�~�UcU$[UnUR5 U$![a [SU-5Sef=f)Nzcannot find context for %r)�_concrete_contexts�KeyError�
ValueError�_check_available)r#�methodr)s   rr+�BaseContext.get_context�sU���>��K�	N�$�V�,�C�	�����
���	N��9�F�B�C��M�	N�s�	"�<c��UR$�N)�_name�r#�
allow_nones  r�get_start_method�BaseContext.get_start_method�s���z�z�rc��[S5e)Nz+cannot set start method of concrete context)r��r#r��forces   r�set_start_method�BaseContext.set_start_method�s���F�G�Grc�4�[5RS5$)zWControls how objects will be reduced to a form that can be
shared with other processes.r)�globals�get�r#s r�reducer�BaseContext.reducer�s���y�}�}�[�)�)rc��U[5S'g)Nr)r�)r#rs  rr�r��s��!*��	�+�rc��gr�rr�s rr��BaseContext._check_available�s��r)Tr�)r)NN)r)NNrN�F)-rrr
rrrrr�staticmethodr�current_process�parent_process�active_childrenr!r.r1r6r:r>rBrFrIrLrSrXr[r^rgrmrqrurzr�r�r�r�r�r+r�r��propertyr��setterr�rrrrrrs���L�#�N��L�-��"�7�#:�#:�;�O�!�'�"8�"8�9�N�"�7�#:�#:�;�O��	��
,�
-�
7�
8�
?�
-�
I�
6�
>�
3�
?A�"�0�1�
?�
37�-�DH�-���$�
!�#�-���H��*��*�

�^�^�+��+�
rrc�8�\rSrSrSr\S5r\S5rSrg)�Process��Nc�\�[R5RRU5$r�)�_default_contextr+r��_Popen)�process_objs rr��Process._Popen�s"���+�+�-�5�5�<�<�[�I�Irc�Z�[R5RR5$r�)r�r+r��_after_forkrrrr��Process._after_fork�s ���+�+�-�5�5�A�A�C�Crr�	rrr
r�
_start_methodr�r�r�rrrrr�r��s1���M��J��J��D��Drr�c�P^�\rSrSr\rSrSU4SjjrS	SjrS	SjrSr	Sr
U=r$)
�DefaultContext��c��XlSUlgr�)r��_actual_context)r#r_s  r�__init__�DefaultContext.__init__�s�� '��#��rc�|>�Uc*URcURUlUR$[TU]
U5$r�)r�r��superr+)r#r��	__class__s  �rr+�DefaultContext.get_context�s>����>��#�#�+�'+�'<�'<��$��'�'�'��7�&�v�.�.rc��URbU(d[S5eUcU(aSUlgURU5Ulg)Nzcontext has already been set)r��RuntimeErrorr+r�s   rr��DefaultContext.set_start_method�sA�����+�E��=�>�>��>�e�#'�D� ��#�/�/��7��rc�z�URcU(agURUlURR$r�)r�r�r�r�s  rr��DefaultContext.get_start_method�s4�����'���#'�#8�#8�D� ��#�#�)�)�)rc��[RS:XaS/$[RS:XaSS/OSS/n[R(aUR	S5 U$)z=Returns a list of the supported start methods, default first.rxr~�darwin�forkr�)r{r|r�HAVE_SEND_HANDLE�append)r#�methodss  r�get_all_start_methods�$DefaultContext.get_all_start_methodssM���<�<�7�"��9��+.�<�<�8�+C�w��'�&�RY�IZ�G��)�)����|�,��Nr)r�r�r�r�)rrr
rr�r�r+r�r�r�r�
__classcell__)r�s@rr�r��s&����G�$�/�8�*��rr�rxc�(�\rSrSrSr\S5rSrg)�ForkProcessir�c��SSKJn U"U5$�Nr)�Popen)�
popen_forkr��r�r�s  rr��ForkProcess._Popens��)���%�%rrN�rrr
rr�r�r�rrrrr�r�s���
�	�	&�
�	&rr�c�8�\rSrSrSr\S5r\S5rSrg)�SpawnProcessir~c��SSKJn U"U5$r�)�popen_spawn_posixr�r�s  rr��SpawnProcess._Popen���0���%�%rc��gr�rrrrr��SpawnProcess._after_fork#���
rrNr�rrrr�r��-���
�	�	&�
�	&�
�	�
�	rr�c�(�\rSrSrSr\S5rSrg)�ForkServerProcessi(r�c��SSKJn U"U5$r�)�popen_forkserverr�r�s  rr��ForkServerProcess._Popen*s��/���%�%rrNr�rrrr�r�(s��$�
�	�	&�
�	&rr�c��\rSrSrSr\rSrg)�ForkContexti/r�rN)rrr
rr�r�r�rrrrr�r�/s�����rr�c��\rSrSrSr\rSrg)�SpawnContexti3r~rN�rrr
rr�r�r�rrrrr�r�3������rr�c�"�\rSrSrSr\rSrSrg)�ForkServerContexti7r�c�D�[R(d[S5eg)Nz%forkserver start method not available)rr�r�r�s rr��"ForkServerContext._check_available:s���-�-� �!H�I�I�.rrN)	rrr
rr�r�r�r�rrrrr�r�7s����#��	Jrr�)r�r~r�r�r~r�c�8�\rSrSrSr\S5r\S5rSrg)r�iLr~c��SSKJn U"U5$r�)�popen_spawn_win32r�r�s  rr�r�Nr�rc��gr�rrrrr�r�Sr�rrNr�rrrr�r�Lr�rc��\rSrSrSr\rSrg)r�iXr~rNr�rrrr�r�Xr�rc�(�[U[lgr�)r�r�r�)r�s r�_force_start_methodres��'9�&�'A��$rc�$�[[SS5$)N�spawning_popen)r}�_tlsrrr�get_spawning_popenr
ns���4�)�4�0�0rc��U[lgr�)r	r)�popens r�set_spawning_popenr
qs
���D�rc�\�[5c![S[U5R-5eg)NzF%s objects should only be shared between processes through inheritance)r
r��typer)�objs r�assert_spawningrts4����#��
#�%)�#�Y�%7�%7�
8��	�$r) r r{�	threadingr�rr�__all__�	Exceptionrrrr�objectr�BaseProcessr�r�r|r�r�r�r�r�r�r�r�r�localr	r
r
rrrr�<module>rs���	�
����
��	�9�	�	�\�	�	�<�	�	�,�	�x
�&�x
�|D�g�!�!�D�&�[�&�Z�<�<�7��&�g�)�)�&�
�w�*�*�
�&�G�/�/�&��k���{��J�K�J��
���'�)���
�|�|�x��*�*<�W�*E�F��)�*<�V�*D�E��
�w�*�*�
��{��
	�����&�&8��&A�B��B������1� �r

?>