Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/synchronize.cpython-311.opt-1.pyc
�

�,d�-����gd�ZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z		ddlm
Z
mZn#e$red���wxYwe
ed	����\ZZej
jZGd
�de��Z
Gd�d
e
��ZGd�de��ZGd�de
��ZGd�de
��ZGd�de��ZGd�de��ZGd�dej��ZdS))�Lock�RLock�	Semaphore�BoundedSemaphore�	Condition�Event�N�)�context)�process)�util)�SemLock�
sem_unlinkz�This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.�c�|�eZdZej��Zd�Zed���Zd�Z	d�Z
d�Zd�Zd�Z
ed���Zd	S)
r
c��|�tj���}|���}tjdkp|dk}t
d��D]E}	tj||||�	��|��x}|_
n#t$rY�BwxYwtd���tj
d|jz��|���tjdkrd�}	tj||	��|j
j�Kddlm}
|
|j
jd	��tj|tj|j
jfd
���dSdS)N�win32�fork�dzcannot find name for semaphorezcreated semlock with handle %sc�8�|j���dS�N)�_semlock�_after_fork)�objs �B/opt/alt/python311/lib64/python3.11/multiprocessing/synchronize.pyrz%SemLock.__init__.<locals>._after_forkGs����(�(�*�*�*�*�*�r	)�register�	semaphorer)�exitpriority)r
�_default_context�get_context�get_start_method�sys�platform�range�_multiprocessingr
�
_make_namer�FileExistsErrorr�debug�handle�
_make_methods�register_after_fork�name�resource_trackerr�Finalize�_cleanup)�self�kind�value�maxvalue�ctxr,�
unlink_now�i�slrrs           r�__init__zSemLock.__init__2s����;��*�6�6�8�8�C��#�#�%�%���\�W�,�>����
��s���
	D�
	D�A�
�%5�%=��%��4�?�?�+<�+<��& �& � ��T�]����#�
�
�
���
����
"�"B�C�C�C��
�3�b�i�?�@�@�@��������<�7�"�"�
+�
+�
+��$�T�;�7�7�7��=��)�
3�2�2�2�2�2��H�T�]�'��5�5�5��M�$�� 0�4�=�3E�2G�'(�
*�
*�
*�
*�
*�
*�
*�)s�1B�
B�Bc�H�ddlm}t|��||d��dS)Nr	)�
unregisterr)r-r:r)r,r:s  rr/zSemLock._cleanupTs:��0�0�0�0�0�0��4�����
�4��%�%�%�%�%rc�J�|jj|_|jj|_dSr)r�acquire�release�r0s rr*zSemLock._make_methodsZs���}�,����}�,����rc�4�|j���Sr)r�	__enter__r>s rr@zSemLock.__enter__^s���}�&�&�(�(�(rc� �|jj|�Sr)r�__exit__�r0�argss  rrBzSemLock.__exit__as��%�t�}�%�t�,�,rc���tj|��|j}tjdkr,tj���|j��}n|j}||j|j	|j
fS)Nr)r
�assert_spawningrr"r#�get_spawning_popen�duplicate_for_childr)r1r3r,)r0r7�hs   r�__getstate__zSemLock.__getstate__dsc�����%�%�%�
�]���<�7�"�"��*�,�,�@�@���K�K�A�A��	�A��2�7�B�K���1�1rc��tjj|�|_t	jd|dz��|���dS)Nz recreated blocker with handle %rr)r%r
�_rebuildrrr(r*�r0�states  r�__setstate__zSemLock.__setstate__msF��(�0�9�5�A��
��
�5��a��@�A�A�A��������rc�v�tj��jd�dttj����S)N�	semprefix�-)r�current_process�_config�nextr
�_rand�rrr&zSemLock._make_namers6��!�1�3�3�;�K�H�H�H��w�}�-�-�-�/�	/rN)�__name__�
__module__�__qualname__�tempfile�_RandomNameSequencerVr8�staticmethodr/r*r@rBrJrOr&rWrrr
r
.s�������(�H�(�*�*�E� *� *� *�D�&�&��\�&�
-�-�-�)�)�)�-�-�-�2�2�2����
�/�/��\�/�/�/rr
c�"�eZdZdd�Zd�Zd�ZdS)rr	c�L�tj|t|t|���dS�N�r4)r
r8�	SEMAPHORE�
SEM_VALUE_MAX�r0r2r4s   rr8zSemaphore.__init__}s$�����y�%��C�H�H�H�H�H�Hrc�4�|j���Sr)r�
_get_valuer>s r�	get_valuezSemaphore.get_value�s���}�'�'�)�)�)rc��	|j���}n#t$rd}YnwxYwd|jj�d|�d�S)N�unknown�<�(value=�)>)rrf�	Exception�	__class__rX�r0r2s  r�__repr__zSemaphore.__repr__�s[��	��M�,�,�.�.�E�E���	�	�	��E�E�E�	�����#'�>�#:�#:�#:�E�E�E�B�B���+�+N�r	)rXrYrZr8rgrprWrrrr{sO������I�I�I�I�*�*�*�C�C�C�C�Crrc��eZdZdd�Zd�ZdS)rr	c�B�tj|t|||���dSr`�r
r8rbrds   rr8zBoundedSemaphore.__init__�s$�����y�%��C�@�@�@�@�@�@rc��	|j���}n#t$rd}YnwxYwd|jj�d|�d|jj�d�S)Nrirjrkz, maxvalue=rl)rrfrmrnrXr3ros  rrpzBoundedSemaphore.__repr__�sp��	��M�,�,�.�.�E�E���	�	�	��E�E�E�	�������'�'�'�����
�0F�0F�0F�H�	HrqNrr�rXrYrZr8rprWrrrr�s@������A�A�A�A�H�H�H�H�Hrrc��eZdZd�Zd�ZdS)rc�B�tj|tdd|���dS�Nr	raru�r0r4s  rr8z
Lock.__init__�s$�����y�!�Q�C�8�8�8�8�8�8rc��	|j���rStj��j}tj��jdkr|dtj��jzz
}nB|j���dkrd}n"|j���dkrd}nd}n#t$rd}YnwxYwd	|j
j�d
|�d�S)N�
MainThread�|r	�Noner�SomeOtherThread�SomeOtherProcessrirjz(owner=rl)r�_is_minerrSr,�	threading�current_threadrf�_countrmrnrX)r0r,s  rrpz
Lock.__repr__�s���	��}�%�%�'�'�	
*��.�0�0�5���+�-�-�2�l�B�B��C�)�":�"<�"<�"A�A�A�D����)�)�+�+�q�0�0������%�%�'�'�!�+�+�(���)�����	�	�	��D�D�D�	�����#'�>�#:�#:�#:�D�D�D�A�As�B.B1�1C�?CNrwrWrrrr�s7������9�9�9�B�B�B�B�Brrc��eZdZd�Zd�ZdS)rc�B�tj|tdd|���dSrz)r
r8�RECURSIVE_MUTEXr{s  rr8zRLock.__init__�s$�������1�#�>�>�>�>�>�>rc��	|j���rltj��j}tj��jdkr|dtj��jzz
}|j���}nK|j���dkrd\}}n(|j���dkrd\}}nd\}}n#t$rd\}}YnwxYwd	|j
j�d
|�d|�d�S)
Nr}r~r	)rrr)r��nonzero)r�r�)ririrj�(�, rl)rr�rrSr,r�r�r�rfrmrnrX)r0r,�counts   rrpzRLock.__repr__�s��
	/��}�%�%�'�'�

<��.�0�0�5���+�-�-�2�l�B�B��C�)�":�"<�"<�"A�A�A�D��
�,�,�.�.�����)�)�+�+�q�0�0�'���e�e���%�%�'�'�!�+�+�:���e�e�;���e����	/�	/�	/�.�K�D�%�%�%�	/�����!%��!8�!8�!8�$�$�$����F�Fs�CC�C%�$C%NrwrWrrrr�s7������?�?�?�G�G�G�G�Grrc�X�eZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	dd	�Z
dd�Zd�Zdd
�Z
dS)rNc��|p|���|_|�d��|_|�d��|_|�d��|_|���dS�Nr)r�_lockr�_sleeping_count�_woken_count�_wait_semaphorer*)r0�lockr4s   rr8zCondition.__init__�sj���(�S�Y�Y�[�[��
�"�}�}�Q�/�/����M�M�!�,�,���"�}�}�Q�/�/����������rc�^�tj|��|j|j|j|jfSr)r
rFr�r�r�r�r>s rrJzCondition.__getstate__�s2�����%�%�%��
�D�0��!�4�#7�9�	9rc�d�|\|_|_|_|_|���dSr)r�r�r�r�r*rMs  rrOzCondition.__setstate__�s6��49�	2���T�)�	
�	�D�0��������rc�4�|j���Sr)r�r@r>s rr@zCondition.__enter__�s���z�#�#�%�%�%rc� �|jj|�Sr)r�rBrCs  rrBzCondition.__exit__�s��"�t�z�"�D�)�)rc�J�|jj|_|jj|_dSr)r�r<r=r>s rr*zCondition._make_methods�s���z�)����z�)����rc���	|jj���|jj���z
}n#t$rd}YnwxYwd|jj�d|j�d|�d�S)Nrirjr�r�rl)r�rrfr�rmrnrXr�)r0�num_waiterss  rrpzCondition.__repr__�s���	$��/�8�C�C�E�E��,�5�@�@�B�B�C�K�K���	$�	$�	$�#�K�K�K�	$�����!%��!8�!8�!8�$�*�*�*�k�k�k�R�Rs�=A�A�Ac��|j���|jj���}t|��D]}|j����	|j�d|��|j���t|��D]}|j����S#|j���t|��D]}|j����wxYw)NT)	r�r=r�rr�r$r�r<r�)r0�timeoutr�r6s    r�waitzCondition.wait�s��
	
��$�$�&�&�&��
�#�*�*�,�,���u���	!�	!�A��J��� � � � �		%��'�/�/��g�>�>�
��%�%�'�'�'��5�\�\�
%�
%���
�"�"�$�$�$�$�
%��
��%�%�'�'�'��5�\�\�
%�
%���
�"�"�$�$�$�$�
%���s
�$C�AD	r	c�.�|j�d��r4|j�d��}|j�d���4d}||krX|j�d��r>|j���|dz
}||kr|j�d���>|rbt|��D]}|j����|j�d��r	|j�d���dSdSdS)NFrr	)r�r<r�r�r=r$)r0�n�res�sleepersr6s     r�notifyzCondition.notifys?����'�'��.�.�	8��&�.�.�u�5�5�C���'�'��.�.�	8�
����l�l�t�3�;�;�E�B�B�l�� �(�(�*�*�*���M�H���l�l�t�3�;�;�E�B�B�l��	��8�_�_�
,�
,���!�)�)�+�+�+�+��&�.�.�u�5�5�
���&�.�.�u�5�5�
�
�
�	�	�

�
rc�F�|�tj���dS)N)r�)r�r"�maxsizer>s r�
notify_allzCondition.notify_all(s�����c�k��"�"�"�"�"rc���|��}|r|S|�tj��|z}nd}d}|s@|�|tj��z
}|dkrn!|�|��|��}|�@|Sr�)�time�	monotonicr�)r0�	predicater��result�endtime�waittimes      r�wait_forzCondition.wait_for+s���������	��M����n�&�&��0�G�G��G��H��	!��"�"�T�^�%5�%5�5���q�=�=���I�I�h�����Y�[�[�F�
�	!��
rrrr)rXrYrZr8rJrOr@rBr*rpr�r�r�r�rWrrrr�s�����������9�9�9�
���
&�&�&�*�*�*�*�*�*�S�S�S�%�%�%�%�.����4#�#�#������rrc�:�eZdZd�Zd�Zd�Zd�Zd	d�Zdefd�Z	dS)
rc��|�|�����|_|�d��|_dSr�)rr�_condr�_flagr{s  rr8zEvent.__init__Cs4���]�]�3�8�8�:�:�.�.��
��]�]�1�%�%��
�
�
rc���|j5|j�d��r'|j���	ddd��dS	ddd��dS#1swxYwYdS�NFT)r�r�r<r=r>s r�is_setzEvent.is_setGs���
�Z�	�	��z�!�!�%�(�(�
��
�"�"�$�$�$��	�	�	�	�	�	�	�	��		�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�5A�
A�A�Ac���|j5|j�d��|j���|j���ddd��dS#1swxYwYdS�NF)r�r�r<r=r�r>s r�setz	Event.setNs���
�Z�	$�	$��J���u�%�%�%��J��� � � ��J�!�!�#�#�#�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$s�A
A"�"A&�)A&c�z�|j5|j�d��ddd��dS#1swxYwYdSr�)r�r�r<r>s r�clearzEvent.clearTs���
�Z�	&�	&��J���u�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&s�0�4�4Nc�f�|j5|j�d��r|j���n|j�|��|j�d��r'|j���	ddd��dS	ddd��dS#1swxYwYdSr�)r�r�r<r=r�)r0r�s  rr�z
Event.waitXs
��
�Z�		�		��z�!�!�%�(�(�
)��
�"�"�$�$�$�$��
����(�(�(��z�!�!�%�(�(�
��
�"�"�$�$�$��		�		�		�		�		�		�		�		��		�		�		�		�		�		�		�		�		�		�		�		����		�		�		�		�		�		s�BB&�B&�&B*�-B*�returnc��|���rdnd}dt|��j�dt|��d�d|�d�S)Nr��unsetrjz at z#x� �>)r��typerZ�id)r0�
set_statuss  rrpzEvent.__repr__dsK��"�k�k�m�m�8�U�U��
�K�4��:�:�*�K�K��4���K�K�K�j�K�K�K�Krr)
rXrYrZr8r�r�r�r��strrprWrrrrAs�������&�&�&����$�$�$�&�&�&�
�
�
�
�L�#�L�L�L�L�L�Lrrc��eZdZd	d�Zd�Zd�Zed���Zejd���Zed���Z	e	jd���Z	dS)
�BarrierNc���ddl}ddlm}||�d��dz��}|���}|�|||||f��d|_d|_dS)Nrr	)�
BufferWrapperr6r)�struct�heapr��calcsizerrO�_stater�)	r0�parties�actionr�r4r�r��wrapper�conds	         rr8zBarrier.__init__ms{���
�
�
�'�'�'�'�'�'��-����� 4� 4�q� 8�9�9���}�}�������7�F�G�T�7�C�D�D�D��������rc��|\|_|_|_|_|_|j����d��|_dS)Nr6)�_parties�_action�_timeoutr��_wrapper�create_memoryview�cast�_arrayrMs  rrOzBarrier.__setstate__vsF��&+�	$�����d�m�	
��T�]��m�5�5�7�7�<�<�S�A�A����rc�B�|j|j|j|j|jfSr)r�r�r�r�r�r>s rrJzBarrier.__getstate__{s"���
�t�|�T�]��
�D�M�+�	+rc��|jdSr��r�r>s rr�zBarrier._state����{�1�~�rc��||jd<dSr�r�ros  rr�zBarrier._state�������A���rc��|jdS�Nr	r�r>s rr�zBarrier._count�r�rc��||jd<dSr�r�ros  rr�zBarrier._count�r�r)NN)
rXrYrZr8rOrJ�propertyr��setterr�rWrrr�r�ks�����������B�B�B�
+�+�+�����X���]����]������X���]����]���rr�)�__all__r�r"r[r%r��r
rrr
r�ImportError�listr$r�rbrc�objectrrrrrrr�rWrr�<module>r�s�����������
�
�
�
�������������������������������
4�4�4�4�4�4�4�4�4�4���4�4�4�
�+�3�4�4�4�4����"�T�%�%��(�(�^�^���� �(�6�
�G/�G/�G/�G/�G/�f�G/�G/�G/�Z
C�
C�
C�
C�
C��
C�
C�
C�&H�H�H�H�H�y�H�H�H�"B�B�B�B�B�7�B�B�B�2G�G�G�G�G�G�G�G�G�4i�i�i�i�i��i�i�i�^%L�%L�%L�%L�%L�F�%L�%L�%L�T"�"�"�"�"�i��"�"�"�"�"s	�5�A

ZeroDay Forums Mini