AlkantarClanX12

Your IP : 18.191.192.109


Current Path : /opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/context.cpython-311.opt-2.pyc

�

c��fM-��0�ddlZddlZddlZddlmZddlmZdZGd�de��ZGd�d	e��Z	Gd
�de��Z
Gd�d
e��ZGd�de��Z
Gd�dej��ZGd�de
��Zejdkr�Gd�dej��ZGd�dej��ZGd�dej��ZGd�de
��ZGd�de
��ZGd�d e
��Ze��e��e��d!�Zejd"kreed#��ZnPeed$��Zn>Gd%�dej��ZGd&�de
��Zd#e��iZeed#��Zd'�Zej��Zd(�Zd)�Zd*�ZdS)+�N�)�process)�	reduction�c��eZdZdS)�ProcessErrorN��__name__�
__module__�__qualname__r��>/opt/alt/python311/lib64/python3.11/multiprocessing/context.pyrr��������Dr
rc��eZdZdS)�BufferTooShortNr	rr
rrrrr
rc��eZdZdS)�TimeoutErrorNr	rr
rrrrr
rc��eZdZdS)�AuthenticationErrorNr	rr
rrrrr
rc��eZdZeZeZeZeZeej	��Z	eej
��Z
eej��Zd�Zd�Z
d&d�Zd�Zd�Zd'd�Zd(d
�Zd(d�Zd�Zd)d
�Zd*d�Zd*d�Zd�Z		d+d�Zd�Zd�Zdd�d�Zdd�d�Zd�Zd�Zd'd�Z d�Z!d�Z"d�Z#d'd�Z$d,d!�Z%d,d"�Z&e'd#���Z(e(j)d$���Z(d%�Z*dS)-�BaseContextc�P�	tj��}|�td���|S)Nzcannot determine number of cpus)�os�	cpu_count�NotImplementedError)�self�nums  rrzBaseContext.cpu_count)s)��6��l�n�n���;�%�&G�H�H�H��Jr
c�x�	ddlm}||������}|���|S)Nr)�SyncManager��ctx)�managersr�get_context�start)rr�ms   r�ManagerzBaseContext.Manager1sK��	�
	*�)�)�)�)�)��K�D�,�,�.�.�/�/�/��	���	�	�	��r
Tc�&�	ddlm}||��S)Nr)�Pipe)�
connectionr()r�duplexr(s   rr(zBaseContext.Pipe<s%��?�$�$�$�$�$�$��t�F�|�|�r
c�L�	ddlm}||������S)Nr)�Lockr )�synchronizer,r#)rr,s  rr,zBaseContext.LockAs6��1�%�%�%�%�%�%��t��(�(�*�*�+�+�+�+r
c�L�	ddlm}||������S)Nr)�RLockr )r-r/r#)rr/s  rr/zBaseContext.RLockFs6��-�&�&�&�&�&�&��u��)�)�+�+�,�,�,�,r
Nc�N�	ddlm}|||������S)Nr)�	Conditionr )r-r1r#)r�lockr1s   rr1zBaseContext.ConditionKs8��(�*�*�*�*�*�*��y��4�#3�#3�#5�#5�6�6�6�6r
rc�N�	ddlm}|||������S)Nr)�	Semaphorer )r-r4r#)r�valuer4s   rr4zBaseContext.SemaphorePs8��(�*�*�*�*�*�*��y��D�$4�$4�$6�$6�7�7�7�7r
c�N�	ddlm}|||������S)Nr)�BoundedSemaphorer )r-r7r#)rr5r7s   rr7zBaseContext.BoundedSemaphoreUs9��0�1�1�1�1�1�1����4�+;�+;�+=�+=�>�>�>�>r
c�L�	ddlm}||������S)Nr)�Eventr )r-r9r#)rr9s  rr9zBaseContext.EventZs6��%�&�&�&�&�&�&��u��)�)�+�+�,�,�,�,r
c�R�	ddlm}|||||������S)Nr)�Barrierr )r-r;r#)r�parties�action�timeoutr;s     rr;zBaseContext.Barrier_s<��&�(�(�(�(�(�(��w�w���T�5E�5E�5G�5G�H�H�H�Hr
rc�N�	ddlm}|||������S)Nr)�Queuer )�queuesr@r#)r�maxsizer@s   rr@zBaseContext.Queueds8��$�!�!�!�!�!�!��u�W�$�"2�"2�"4�"4�5�5�5�5r
c�N�	ddlm}|||������S)Nr)�
JoinableQueuer )rArDr#)rrBrDs   rrDzBaseContext.JoinableQueueis8��$�)�)�)�)�)�)��}�W�$�*:�*:�*<�*<�=�=�=�=r
c�L�	ddlm}||������S)Nr)�SimpleQueuer )rArFr#)rrFs  rrFzBaseContext.SimpleQueuens6��$�'�'�'�'�'�'��{�t�/�/�1�1�2�2�2�2r
rc�T�	ddlm}||||||������S)Nr)�Pool)�context)�poolrHr#)r�	processes�initializer�initargs�maxtasksperchildrHs      rrHzBaseContext.PoolssH��+��������t�I�{�H�6F� �,�,�.�.�0�0�0�	0r
c�"�	ddlm}||g|�R�S)Nr)�RawValue)�sharedctypesrP)r�typecode_or_type�argsrPs    rrPzBaseContext.RawValuezs0��%�*�*�*�*�*�*��x�(�0�4�0�0�0�0r
c�(�	ddlm}|||��S)Nr)�RawArray)rQrU)rrR�size_or_initializerrUs    rrUzBaseContext.RawArrays+��$�*�*�*�*�*�*��x�(�*=�>�>�>r
)r2c�N�	ddlm}||g|�R||���d��S)Nr)�Value�r2r!)rQrXr#)rrRr2rSrXs     rrXzBaseContext.Value�sU��2�'�'�'�'�'�'��u�%�-��-�-�4��)�)�+�+�-�-�-�	-r
c�R�	ddlm}|||||������S)Nr)�ArrayrY)rQr[r#)rrRrVr2r[s     rr[zBaseContext.Array�sG��1�'�'�'�'�'�'��u�%�':���)�)�+�+�-�-�-�	-r
c�|�	tjdkr(ttdd��rddlm}|��dSdSdS)N�win32�frozenFr)�freeze_support)�sys�platform�getattr�spawnr_)rr_s  rr_zBaseContext.freeze_support�s[��	��<�7�"�"�w�s�H�e�'D�'D�"�-�-�-�-�-�-��N������#�"�"�"r
c�$�	ddlm}|��S)Nr)�
get_logger)�utilre)rres  rrezBaseContext.get_logger�s'��	�	%�$�$�$�$�$��z�|�|�r
c�&�	ddlm}||��S)Nr)�
log_to_stderr)rfrh)r�levelrhs   rrhzBaseContext.log_to_stderr�s'��F�'�'�'�'�'�'��}�U�#�#�#r
c��	ddlm}dS)Nr)r))�r))rr)s  r�allow_connection_picklingz%BaseContext.allow_connection_pickling�s!��	�
	!� � � � � � � r
c�*�	ddlm}||��dS)Nr)�set_executable)rcrn)r�
executablerns   rrnzBaseContext.set_executable�s1��	�	*�)�)�)�)�)���z�"�"�"�"�"r
c�*�	ddlm}||��dS)Nr)�set_forkserver_preload)�
forkserverrq)r�module_namesrqs   rrqz"BaseContext.set_forkserver_preload�s2��	�	7�6�6�6�6�6���|�,�,�,�,�,r
c��|�|S	t|}n!#t$rtd|z��d�wxYw|���|S)Nzcannot find context for %r)�_concrete_contexts�KeyError�
ValueError�_check_available)r�methodr!s   rr#zBaseContext.get_context�sj���>��K�	N�$�V�,�C�C���	N�	N�	N��9�F�B�C�C��M�	N�����������
s�
�2Fc��|jS�N)�_name�r�
allow_nones  r�get_start_methodzBaseContext.get_start_method�s
���z�r
c� �td���)Nz+cannot set start method of concrete context)rw�rry�forces   r�set_start_methodzBaseContext.set_start_method�s���F�G�G�Gr
c�F�	t���d��S�Nr)�globals�get�rs r�reducerzBaseContext.reducer�s��	(��y�y�}�}�[�)�)�)r
c�(�|t��d<dSr�)r�)rrs  rr�zBaseContext.reducer�s��!*��	�	�+���r
c��dSr{rr�s rrxzBaseContext._check_available�s���r
)Tr{)r)NN)r)NNrN�F)+r
rrrrrr�staticmethodr�current_process�parent_process�active_childrenrr&r(r,r/r1r4r7r9r;r@rDrFrHrPrUrXr[r_rerhrlrnrqr#rr��propertyr��setterrxrr
rrrs��������L�#�N��L�-��"�l�7�#:�;�;�O�!�\�'�"8�9�9�N�"�l�7�#:�;�;�O����	�	�	�����
,�,�,�
-�-�-�
7�7�7�7�
8�8�8�8�
?�?�?�?�
-�-�-�
I�I�I�I�
6�6�6�6�
>�>�>�>�
3�3�3�
?A�"�0�0�0�0�1�1�1�
?�?�?�
37�-�-�-�-�-�DH�-�-�-�-�-�������$�$�$�$�
!�!�!�#�#�#�-�-�-���������H�H�H�H��*�*��X�*�

�^�+�+��^�+�
�
�
�
�
r
rc�>�eZdZdZed���Zed���ZdS)�ProcessNc�d�t���j�|��Sr{)�_default_contextr#r��_Popen)�process_objs rr�zProcess._Popen�s%���+�+�-�-�5�<�<�[�I�I�Ir
c�b�t���j���Sr{)r�r#r��_after_forkrr
rr�zProcess._after_fork�s#���+�+�-�-�5�A�A�C�C�Cr
�r
rr�
_start_methodr�r�r�rr
rr�r��sU�������M��J�J��\�J��D�D��\�D�D�Dr
r�c�@��eZdZeZd�Zd�fd�	Zd	d�Zd	d�Zd�Z�xZ	S)
�DefaultContextc�"�||_d|_dSr{)r��_actual_context)rrIs  r�__init__zDefaultContext.__init__�s�� '���#����r
Nc�~��|�|j�|j|_|jSt���|��Sr{)r�r��superr#)rry�	__class__s  �rr#zDefaultContext.get_context�s=����>��#�+�'+�'<��$��'�'��7�7�&�&�v�.�.�.r
Fc��|j�|std���|�|r	d|_dS|�|��|_dS)Nzcontext has already been set)r��RuntimeErrorr#r�s   rr�zDefaultContext.set_start_method�sQ����+�E�+��=�>�>�>��>�e�>�#'�D� ��F�#�/�/��7�7����r
c�H�|j�|rdS|j|_|jjSr{)r�r�r|r}s  rrzDefaultContext.get_start_method�s/����'��
��t�#'�#8�D� ��#�)�)r
c��tjdkrdgStjdkrddgnddg}tjr|�d��|S)Nr]rc�darwin�forkrr)r`rar�HAVE_SEND_HANDLE�append)r�methodss  r�get_all_start_methodsz$DefaultContext.get_all_start_methodssZ���<�7�"�"��9��+.�<�8�+C�+C�w��'�'�&�RY�IZ�G��)�
-����|�,�,�,��Nr
r{r�)
r
rrr�r�r#r�rr��
__classcell__)r�s@rr�r��s���������G�$�$�$�/�/�/�/�/�/�8�8�8�8�*�*�*�*�������r
r�r]c�(�eZdZdZed���ZdS)�ForkProcessr�c�$�ddlm}||��S�Nr)�Popen)�
popen_forkr��r�r�s  rr�zForkProcess._Popens$��)�)�)�)�)�)��5��%�%�%r
N�r
rrr�r�r�rr
rr�r�s2�������
�	�	&�	&�
��	&�	&�	&r
r�c�>�eZdZdZed���Zed���ZdS)�SpawnProcessrcc�$�ddlm}||��Sr�)�popen_spawn_posixr�r�s  rr�zSpawnProcess._Popen�$��0�0�0�0�0�0��5��%�%�%r
c��dSr{rrr
rr�zSpawnProcess._after_fork"�	��
�Dr
Nr�rr
rr�r��M�������
�	�	&�	&�
��	&�
�	�	�
��	�	�	r
r�c�(�eZdZdZed���ZdS)�ForkServerProcessrrc�$�ddlm}||��Sr�)�popen_forkserverr�r�s  rr�zForkServerProcess._Popen)s$��/�/�/�/�/�/��5��%�%�%r
Nr�rr
rr�r�'s2������$�
�	�	&�	&�
��	&�	&�	&r
r�c��eZdZdZeZdS)�ForkContextr�N)r
rrr|r�r�rr
rr�r�.s�����������r
r�c��eZdZdZeZdS��SpawnContextrcN�r
rrr|r�r�rr
rr�r�2������������r
r�c��eZdZdZeZd�ZdS)�ForkServerContextrrc�<�tjstd���dS)Nz%forkserver start method not available)rr�rwr�s rrxz"ForkServerContext._check_available9s)���-�
J� �!H�I�I�I�
J�
Jr
N)r
rrr|r�r�rxrr
rr�r�6s2��������#��	J�	J�	J�	J�	Jr
r�)r�rcrrr�rcr�c�>�eZdZdZed���Zed���ZdS)r�rcc�$�ddlm}||��Sr�)�popen_spawn_win32r�r�s  rr�zSpawnProcess._PopenMr�r
c��dSr{rrr
rr�zSpawnProcess._after_forkRr�r
Nr�rr
rr�r�Kr�r
c��eZdZdZeZdSr�r�rr
rr�r�Wr�r
c�4�t|t_dSr{)rur�r�)rys r�_force_start_methodr�ds��'9�&�'A��$�$�$r
c�.�ttdd��S)N�spawning_popen)rb�_tlsrr
r�get_spawning_popenr�ms���4�)�4�0�0�0r
c��|t_dSr{)r�r�)�popens r�set_spawning_popenr�ps���D���r
c�j�t���$tdt|��jz���dS)NzF%s objects should only be shared between processes through inheritance)r�r��typer
)�objs r�assert_spawningr�ss>�����#��
#�%)�#�Y�Y�%7�
8���	�$�#r
) rr`�	threadingrkrr�__all__�	Exceptionrrrr�objectr�BaseProcessr�r�rar�r�r�r�r�r�rur�r��localr�r�r�r�rr
r�<module>r�s���	�	�	�	�
�
�
�
�����������������
��	�	�	�	�	�9�	�	�	�	�	�	�	�	�\�	�	�	�	�	�	�	�	�<�	�	�	�	�	�	�	�	�,�	�	�	�x
�x
�x
�x
�x
�&�x
�x
�x
�|D�D�D�D�D�g�!�D�D�D�%�%�%�%�%�[�%�%�%�X�<�7���&�&�&�&�&�g�)�&�&�&�
�
�
�
�
�w�*�
�
�
�&�&�&�&�&�G�/�&�&�&������k���������{����J�J�J�J�J�K�J�J�J���
�
�����'�'�)�)����
�|�x���*�>�*<�W�*E�F�F���)�>�*<�V�*D�E�E���
�
�
�
�
�w�*�
�
�
������{����
	�������&�~�&8��&A�B�B��B�B�B��y�����1�1�1� � � �����r