AlkantarClanX12

Your IP : 18.222.92.56


Current Path : /opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/process.cpython-312.opt-1.pyc

�

�Q�fk/���gd�ZddlZddlZddlZddlZddlZddlmZ	ejjej��Zd�Z
d�Zd�Zd�ZGd�d	e�ZGd
�de�ZGd�d
e�ZGd�de�Zdae�aej2d�ae�a[iZeej>jA��D]\Z!Z"e!dddk(s�de!vs�de!��ee"<�[!["e�Z#y#e$rdZY��wxYw))�BaseProcess�current_process�active_children�parent_process�N)�WeakSetc��tS)z@
    Return process object representing the current process
    )�_current_process���>/opt/alt/python312/lib64/python3.12/multiprocessing/process.pyrr%s
���rc�4�t�tt�S)zN
    Return list of process objects corresponding to live child processes
    )�_cleanup�list�	_childrenr
rrrr+s��
�J��	�?�rc��tS)z?
    Return process object representing the parent process
    )�_parent_processr
rrrr3s
���rc��tt�D]7}|jx}s�|j���#tj	|��9y�N)rr�_popen�poll�discard)�p�child_popens  rrr=s;��
�)�_���8�8�#�K�#��)9�)9�);�)G����a� �rc�N�eZdZdZd�Zddddifdd�d�Zd�Zd�Zd	�Zd
�Z	d�Z
dd�Zd
�Zd�Z
ed��Zej d��Zed��Zej d��Zed��Zej d��Zed��Zed��ZeZed��Zd�Zdd�Zed��Zy)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�$�tt�}tj|fz|_tjj�|_t
j�|_tj|_
d|_d|_||_
t|�|_t!|�|_|xs;t%|�j&dzdj)d�|jD��z|_|�||_t.j1|�y)NF�-�:c3�2K�|]}t|����y�wr)�str)�.0�is  r�	<genexpr>z'BaseProcess.__init__.<locals>.<genexpr>^s����=�n��c�!�f�n�s�)�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����%�&��)�3�3�u�h�>���'�/�/�4�4�6����9�9�;���,�1�1�������������4�[��
��F�|����>�T�$�Z�0�0�3�6��X�X�=�d�n�n�=�=�>��
��� �D�K��
�
�d�rc�2�|jrtd��y)Nzprocess object is closed)r3�
ValueErrorrs r�
_check_closedzBaseProcess._check_closedcs���<�<��7�8�8�rc�j�|jr'|j|ji|j��yy)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r4r6r8rs r�runzBaseProcess.rungs+���<�<��D�L�L�$�*�*�5����5�rc���|j�t�|j|�|_|jj|_|`|`|`tj|�y)z%
        Start child process
        N)rGrrr�sentinel�	_sentinelr4r6r8rr>rs r�startzBaseProcess.startnsS��	
����	�
��k�k�$�'������-�-���
�L�$�*�d�l��
�
�d�rc�X�|j�|jj�y)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)rGr�	terminaters rrOzBaseProcess.terminate�s ��	
���������rc�X�|j�|jj�y)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)rGr�killrs rrQzBaseProcess.kill�s ��	
���������rc��|j�|jj|�}|�tj	|�yy)z5
        Wait until child process terminates
        N)rGr�waitrr)r�timeout�ress   rr;zBaseProcess.join�s>��	
�����k�k���w�'���?����d�#�rc��|j�|tury|j�y|jj�}|�ytj|�y)z1
        Return whether process is alive
        TF)rGr	rrrr)r�
returncodes  r�is_alivezBaseProcess.is_alive�sW��	
�����#�#���;�;����[�[�%�%�'�
�������d�#�rc���|j�]|jj��td��|jj�d|_|`t
j
|�d|_y)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�closerLrrr3rs rrZzBaseProcess.close�sg���;�;�"��{�{���!�)� �"P�Q�Q��K�K�����D�K������d�#���rc��|jSr�r<rs rr1zBaseProcess.name�s���z�z�rc��||_yrr\)rr1s  rr1zBaseProcess.name�s����
rc�:�|jjdd�S)z4
        Return whether process is a daemon
        r F)r,�getrs rr zBaseProcess.daemon�s��
�|�|����%�0�0rc�"�||jd<y)z1
        Set whether process is a daemon
        r N�r,)r�daemonics  rr zBaseProcess.daemon�s��"*����X�rc� �|jdS)N�authkeyrars rrdzBaseProcess.authkey�s���|�|�I�&�&rc�4�t|�|jd<y)z2
        Set authorization key of process
        rdN)�AuthenticationStringr,)rrds  rrdzBaseProcess.authkey�s��
#7�w�"?����Y�rc��|j�|j�|jS|jj�S)zM
        Return exit code of process or `None` if it has yet to stop
        )rGrrrs r�exitcodezBaseProcess.exitcode�s7��
	
�����;�;���;�;���{�{���!�!rc��|j�|turtj�S|jxr|jj
S)zU
        Return identifier (PID) of process or `None` if it has yet to start
        )rGr	r.r/r�pidrs r�identzBaseProcess.ident�s<��
	
�����#�#��9�9�;���;�;�2�4�;�;�?�?�2rc�n�|j�	|jS#t$r
td�d�wxYw)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)rGrL�AttributeErrorrFrs rrKzBaseProcess.sentinel�s<��	
����	>��>�>�!���	>��2�3��=�	>�s��4c��d}|turd}nc|jrd}nT|jtj�k7rd}n0|j
�d}n!|j
j
�}|�d}nd}t|�jd|jzg}|j
�(|jd|j
jz�|jd|jz�|j|�|�*tj||�}|jd	|z�|jr|jd
�ddj|�zS)
N�started�closed�unknown�initial�stoppedzname=%rzpid=%sz	parent=%szexitcode=%sr z<%s>� )r	r3r0r.r/rrr9r:r<�appendrj�_exitcode_to_namer_r r;)rrh�status�infos    r�__repr__zBaseProcess.__repr__s�����#�#��F�
�\�\��F�
�
�
�����
,��F�
�[�[�
 ��F��{�{�'�'�)�H��#�"��"���T�
�#�#�Y����%;�<���;�;�"��K�K��4�;�;�?�?�2�3����K�$�"2�"2�2�3����F����(�,�,�X�x�@�H��K�K�
��0�1��;�;��K�K��!�������&�&rc��ddlm}m}	|j�|j	|j�tjd�at�a	|j�t}|at|j|j|�at j"r"t!j$�j'�	|j)�~|j+d�	|j-�d}|j/�	t!jF�|j+d|z�|jI�|S#~wxYw#|j/�wxYw#t0$rw}|j2�d}n^t5|j2t6�r
|j2}n7t8j:j=t?|j2�dz�d}Yd}~��d}~wd}ddl }t8j:j=d|jBz�|jE�Y��xYw#t!jF�|j+dz�|jI�wxYw)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_forkrxrI�_exit_function�
SystemExit�code�
isinstance�int�sys�stderr�writer%�	tracebackr1�	print_exc�	_shutdown�_flush_std_streams)r�parent_sentinelr|r}�old_processrh�er�s        r�
_bootstrapzBaseProcess._bootstrap"s���#�(	&��!�!�-��+�+�D�,>�,>�?�(���q�1����I�����*�K�#��,��!�!�4�#3�#3�_�F�O��/�/��%�%�'�6�6�8�
 �� � �"� ��I�I�8�9�
&����
����#�#�%�
���!��I�I�8�8�C�D��#�#�%����3 ���#�#�%���	��v�v�~����A�F�F�C�(��6�6���
�
� � ��Q�V�V��t�!3�4�����	"��H���J�J���_�t�y�y�8�9����!�����!��I�I�8�8�C�D��#�#�%�sb�B1E�<D<�E�E�1E�H�<D?�?E�E�E�	H� A-G�
H�AH�H�:Ic�d�ddlm}|jj�|j	�y)Nr{�r|)rr|�_finalizer_registry�clear�_run_after_forkersr�s rr�zBaseProcess._after_forkRs#���� � �&�&�(����!rr)r:�
__module__�__qualname__�__doc__rrDrGrIrMrOrQr;rXrZ�propertyr1�setterr rdrhrkrjrKryr��staticmethodr�r
rrrrGs4���
"�"�$�T��2����&9�6��$ ��	$��&�"����
�[�[�����1��1��]�]�*��*��'��'�
�^�^�@��@��"��"��3��3��C�
�	>��	>�'�>.�`�"��"rrc��eZdZd�Zy)rfc�V�ddlm}|��td��tt	|�ffS)Nr{)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)r}r��	TypeErrorrf�bytes)rr�s  r�
__reduce__zAuthenticationString.__reduce__^s3��/���'��2��
�$�e�D�k�^�3�3rN)r:r�r�r�r
rrrfrf]s��4rrfc�4�eZdZd�Zd�Zed��Zdd�ZeZy)r�c�t�d|_||_||_d|_d|_d|_||_i|_y)Nr
F)r+r<�_pidr0rr3rLr,)rr1rjrKs    rrDz_ParentProcess.__init__ns;�������
���	����������!�����rc�:�ddlm}||jgd��S)Nr�rS�rT��multiprocessing.connectionrSrL)rrSs  rrXz_ParentProcess.is_alivexs��3�����(�!�4�4�4rc��|jSr)r�rs rrkz_ParentProcess.ident|s���y�y�rNc�:�ddlm}||jg|��y)z6
        Wait until parent process terminates
        rr�r�Nr�)rrTrSs   rr;z_ParentProcess.join�s��	4��d�n�n�
�w�/rr)	r:r�r�rDrXr�rkr;rjr
rrr�r�ls,���5�����0��Crr�c��eZdZd�Zd�Zy)�_MainProcessc��d|_d|_d|_d|_d|_tt
jd��dd�|_y)Nr
�MainProcessF� z/mp)rd�	semprefix)	r+r<r0rr3rfr.�urandomr,rs rrDz_MainProcess.__init__�sB�����"��
����������#7��
�
�2��#G�%*�,��rc��yrr
rs rrZz_MainProcess.close�s��rN)r:r�r�rDrZr
rrr�r��s��,�$
rr�r{��SIG�_r")$�__all__r.r��signalr�r��_weakrefsetr�path�abspath�getcwd�ORIGINAL_DIR�OSErrorrrrr�objectrr�rfr�r�rr	rCr*r�rrvr�__dict__�itemsr1�signumr=r
rr�<module>r�s&����
�
�
������7�7�?�?�9�2�9�9�;�/�L����!�O"�&�O"�l4�5�4��[��B
�;�
�0���>��"�9�?�?�1�%���E�	��������.�.�0�1�L�D�&��B�Q�x���3�d�?�'(���Z��6�'�"�2�	�&�
�I�	��s���L��s�*C0�0C:�9C: