AlkantarClanX12

Your IP : 3.21.246.53


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

�

c��fk/��&�gd�ZddlZddlZddlZddlZddlZddlmZ	ej�	ej
����Zn
#e$rdZYnwxYwd�Z
d�Zd�Zd�ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��Zdae��aejd��ae��a[iZeej� ����D] \Z!Z"e!dd�dkr
de!vr	de!��ee"<�![!["e��Z#dS))�BaseProcess�current_process�active_children�parent_process�N)�WeakSetc��tS)z@
    Return process object representing the current process
    )�_current_process���>/opt/alt/python311/lib64/python3.11/multiprocessing/process.pyrr%s
���rc�F�t��tt��S)zN
    Return list of process objects corresponding to live child processes
    )�_cleanup�list�	_childrenr
rrrr+s��
�J�J�J��	�?�?�rc��tS)z?
    Return process object representing the parent process
    )�_parent_processr
rrrr3s
���rc��tt��D]9}|jx}r.|����t�|���:dS�N)rr�_popen�poll�discard)�p�child_popens  rrr=sV��
�)�_�_�!�!���8�#�K�	!��)9�)9�);�);�)G����a� � � ��!�!rc�n�eZdZdZd�Zddddifdd�d�Zd�Zd�Zd	�Zd
�Z	d�Z
dd�Zd
�Zd�Z
ed���Zejd���Zed���Zejd���Zed���Zejd���Zed���Zed���ZeZed���Zd�Zdd�Zed���ZdS)rz�
    Process objects represent activity that is run in a separate process

    The class is analogous to `threading.Thread`
    c��t�r)�NotImplementedError��selfs r�_PopenzBaseProcess._PopenMs��!�!rNr
)�daemonc�N�|�
Jd���tt��}tj|fz|_tj���|_t
j��|_tj	|_
d|_d|_||_
t|��|_t!|��|_|p;t%|��jdzd�d�|jD����z|_|�||_t.�|��dS)Nz#group argument must be None for nowF�-�:c3�4K�|]}t|��V��dSr)�str)�.0�is  r�	<genexpr>z'BaseProcess.__init__.<locals>.<genexpr>^s(����=�=��c�!�f�f�=�=�=�=�=�=r)�next�_process_counterr	�	_identity�_config�copy�os�getpid�_parent_pid�name�_parent_namer�_closed�_target�tuple�_args�dict�_kwargs�type�__name__�join�_namer �	_dangling�add)r�group�targetr1�args�kwargsr �counts        r�__init__zBaseProcess.__init__Ps����}�}�C�}�}�}��%�&�&��)�3�u�h�>���'�/�4�4�6�6����9�;�;���,�1�������������4�[�[��
��F�|�|����>�T�$�Z�Z�0�3�6��X�X�=�=�d�n�=�=�=�=�=�>��
��� �D�K��
�
�d�����rc�2�|jrtd���dS)Nzprocess object is closed)r3�
ValueErrorrs r�
_check_closedzBaseProcess._check_closedcs%���<�	9��7�8�8�8�	9�	9rc�F�|jr|j|ji|j��dSdS)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r4r6r8rs r�runzBaseProcess.rungs9���<�	6��D�L�$�*�5���5�5�5�5�5�	6�	6rc��|���|j�
Jd���|jtj��ks
Jd���t
j�d��r
Jd���t��|�	|��|_|jj
|_|`|`
|`t�|��dS)z%
        Start child process
        Nzcannot start a process twicez:can only start a process object created by current processr z3daemonic processes are not allowed to have children)rGrr0r.r/r	r,�getrr�sentinel�	_sentinelr4r6r8rr>rs r�startzBaseProcess.startns���	
�������{�"�"�$B�"�"�"���2�9�;�;�.�.�.�K�/�.�.�#�+�/�/��9�9�	E�	E�D�	E�	E�9��
�
�
��k�k�$�'�'�����-���
�L�$�*�d�l��
�
�d�����rc�`�|���|j���dS)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)rGr�	terminaters rrPzBaseProcess.terminate�s0��	
��������������rc�`�|���|j���dS)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)rGr�killrs rrRzBaseProcess.kill�s0��	
��������������rc��|���|jtj��ks
Jd���|j�
Jd���|j�|��}|�t�|��dSdS)z5
        Wait until child process terminates
        zcan only join a child processNzcan only join a started process)rGr0r.r/r�waitrr)r�timeout�ress   rr;zBaseProcess.join�s���	
��������2�9�;�;�.�.�.�0O�.�.�.��{�&�&�(I�&�&�&��k���w�'�'���?����d�#�#�#�#�#��?rc��|���|turdS|jtj��ks
Jd���|j�dS|j���}|�dSt�|��dS)z1
        Return whether process is alive
        Tzcan only test a child processNF)	rGr	r0r.r/rrrr)r�
returncodes  r�is_alivezBaseProcess.is_alive�s���	
�������#�#�#��4���2�9�;�;�.�.�.�0O�.�.�.��;���5��[�%�%�'�'�
����4����d�#�#�#��5rc���|j�d|j����td���|j���d|_|`t
�|��d|_dS)z�
        Close the Process object.

        This method releases resources held by the Process object.  It is
        an error to call this method if the child process is still running.
        Nz^Cannot close a process while it is still running. You should first call join() or terminate().T)rrrF�closerMrrr3rs rr[zBaseProcess.close�sz���;�"��{���!�!�)� �"P�Q�Q�Q��K�������D�K������d�#�#�#�����rc��|jSr)r<rs rr1zBaseProcess.name�s
���z�rc�R�t|t��s
Jd���||_dS)Nzname must be a string)�
isinstancer%r<)rr1s  rr1zBaseProcess.name�s,���$��$�$�=�=�&=�=�=�$���
�
�
rc�8�|j�dd��S)z4
        Return whether process is a daemon
        r F)r,rKrs rr zBaseProcess.daemon�s��
�|����%�0�0�0rc�<�|j�
Jd���||jd<dS)z1
        Set whether process is a daemon
        Nzprocess has already startedr )rr,)r�daemonics  rr zBaseProcess.daemon�s-��
�{�"�"�$A�"�"�"�!)���X���rc��|jdS)N�authkey)r,rs rrczBaseProcess.authkey�s���|�I�&�&rc�4�t|��|jd<dS)z2
        Set authorization key of process
        rcN)�AuthenticationStringr,)rrcs  rrczBaseProcess.authkey�s��
#7�w�"?�"?���Y���rc�x�|���|j�|jS|j���S)zM
        Return exit code of process or `None` if it has yet to stop
        )rGrrrs r�exitcodezBaseProcess.exitcode�s:��
	
�������;���;���{���!�!�!rc��|���|turtj��S|jo|jjS)zU
        Return identifier (PID) of process or `None` if it has yet to start
        )rGr	r.r/r�pidrs r�identzBaseProcess.ident�s?��
	
�������#�#�#��9�;�;���;�2�4�;�?�2rc�v�|���	|jS#t$rtd��d�wxYw)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)rGrM�AttributeErrorrFrs rrLzBaseProcess.sentinel�sO��	
������	>��>�!���	>�	>�	>��2�3�3��=�	>���s��8c��d}|turd}nS|jrd}nI|jtj��krd}n*|j�d}n |j���}|�d}nd}t|��jd|j	zg}|j�"|�
d|jjz��|�
d|jz��|�
|��|�3t�
||��}|�
d	|z��|jr|�
d
��dd�|��zS)
N�started�closed�unknown�initial�stoppedzname=%rzpid=%sz	parent=%szexitcode=%sr z<%s>� )r	r3r0r.r/rrr9r:r<�appendri�_exitcode_to_namerKr r;)rrg�status�infos    r�__repr__zBaseProcess.__repr__sF�����#�#�#��F�F�
�\�	#��F�F�
�
�����
,�
,��F�F�
�[�
 ��F�F��{�'�'�)�)�H��#�"���"���T�
�
�#�Y���%;�<���;�"��K�K��4�;�?�2�3�3�3����K�$�"2�2�3�3�3����F������(�,�,�X�x�@�@�H��K�K�
��0�1�1�1��;�	"��K�K��!�!�!��������&�&rc���ddlm}m}	|j�|�|j��tjd��at��a	|�
��t}|at|j
|j|��at jr%t!j�����	|���~n#~wxYw|�d��	|���d}|���n#|���wxYwn�#t0$rl}|j�d}nXt5|jt6��r|j}n6t8j�t?|j��dz��d}Yd}~nKd}~wd}ddl }t8j�d|j!z��|�"��YnxYwt!j#��|�d|z��|�$��nD#t!j#��|�d|z��|�$��wxYw|S)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d)%�r{r|�
_start_method�_force_start_method�	itertoolsrCr*�setr�_close_stdinr	�_ParentProcessr2r0r�	threading�_HAVE_THREAD_NATIVE_ID�main_thread�_set_native_id�_after_forkrwrI�_exit_function�
SystemExit�coder^�int�sys�stderr�writer%�	tracebackr1�	print_exc�	_shutdown�_flush_std_streams)r�parent_sentinelr{r|�old_processrg�er�s        r�
_bootstrapzBaseProcess._bootstrap"s|��#�#�#�#�#�#�#�#�(	&��!�-��+�+�D�,>�?�?�?�(��q�1�1�����I�������*�K�#��,��!�4�#3�_�F�F�O��/�
9��%�'�'�6�6�8�8�8�
 �� � �"�"�"� �K��K������I�I�8�9�9�9�
&����
�
�
����#�#�%�%�%�%���#�#�%�%�%�%����%���	�	�	��v�~�����A�F�C�(�(�
��6����
� � ��Q�V���t�!3�4�4�4������������	"��H������J���_�t�y�8�9�9�9����!�!�!�!�!������!�!�!��I�I�8�8�C�D�D�D��#�#�%�%�%�%��
��!�!�!��I�I�8�8�C�D�D�D��#�#�%�%�%�%�����sc�B,D.�7C
�D.�
C�D.�)D�?D.�D*�*D.�-H*�.
G'�8A"F�H*�AG'�%H*�*AI+c�l�ddlm}|j���|���dS)Nrz�r{)r~r{�_finalizer_registry�clear�_run_after_forkersr�s rr�zBaseProcess._after_forkRsA��������� �&�&�(�(�(����!�!�!�!�!rr)r:�
__module__�__qualname__�__doc__rrDrGrIrNrPrRr;rYr[�propertyr1�setterr rcrgrjrirLrxr��staticmethodr�r
rrrrGs��������
"�"�"�"�$�T��2��������&9�9�9�6�6�6����$ � � ����	$�	$�	$�	$����&���"����X��
�[����[���1�1��X�1��]�*�*��]�*��'�'��X�'�
�^�@�@��^�@��"�"��X�"��3�3��X�3��C�
�	>�	>��X�	>�'�'�'�>.�.�.�.�`�"�"��\�"�"�"rrc��eZdZd�ZdS)rec�n�ddlm}|���td���tt	|��ffS)Nrz)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)r|r��	TypeErrorre�bytes)rr�s  r�
__reduce__zAuthenticationString.__reduce__^sO��/�/�/�/�/�/�����'��2���
�$�e�D�k�k�^�3�3rN)r:r�r�r�r
rrrere]s#������4�4�4�4�4rrec�<�eZdZd�Zd�Zed���Zdd�ZeZdS)r�c�v�d|_||_||_d|_d|_d|_||_i|_dS)Nr
F)r+r<�_pidr0rr3rMr,)rr1rirLs    rrDz_ParentProcess.__init__ns?�������
���	����������!�������rc�6�ddlm}||jgd���S)Nr�rT�rU��multiprocessing.connectionrTrM)rrTs  rrYz_ParentProcess.is_alivexs1��3�3�3�3�3�3��4���(�!�4�4�4�4�4rc��|jSr)r�rs rrjz_ParentProcess.ident|s
���y�rNc�8�ddlm}||jg|���dS)z6
        Wait until parent process terminates
        rr�r�Nr�)rrUrTs   rr;z_ParentProcess.join�s6��	4�3�3�3�3�3���d�n�
�w�/�/�/�/�/�/rr)	r:r�r�rDrYr�rjr;rir
rrr�r�lsb���������5�5�5�����X��0�0�0�0��C�C�Crr�c��eZdZd�Zd�ZdS)�_MainProcessc��d|_d|_d|_d|_d|_tt
jd����dd�|_dS)Nr
�MainProcessF� z/mp)rc�	semprefix)	r+r<r0rr3rer.�urandomr,rs rrDz_MainProcess.__init__�sN�����"��
����������#7��
�2���#G�#G�%*�,�,����rc��dSrr
rs rr[z_MainProcess.close�s���rN)r:r�r�rDr[r
rrr�r��s2������,�,�,�$
�
�
�
�
rr�rz��SIG�_r")$�__all__r.r��signalr�r��_weakrefsetr�path�abspath�getcwd�ORIGINAL_DIR�OSErrorrrrr�objectrr�rer�r�rr	rCr*r�rrur�__dict__�itemsr1�signumr=r
rr�<module>r�s:������
�	�	�	�
�
�
�
�
�
�
�
�����������������7�?�?�9�2�9�;�;�/�/�L�L�������L�L�L��������������!�!�!�O"�O"�O"�O"�O"�&�O"�O"�O"�l4�4�4�4�4�5�4�4�4������[����B
�
�
�
�
�;�
�
�
�0���<�>�>��"�9�?�1�%�%���C�E�E�	�����D���.�.�0�0�1�1�0�0�L�D�&��B�Q�B�x����3�d�?�?�%/��Z�Z��6�'�"���&�
�G�I�I�	�	�	s�'A�A�A