Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.144.224.223
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : locks.cpython-313.pyc
�

1}gcP��`�SrSrSSKrSSKrSSKJr SSKJr "SS5r"S	S
\\R5r	"SS\R5r
"S
S\\R5r"SS\\R5r"SS\5r
"SS\R5r"SS\R5rg)zSynchronization primitives.)�Lock�Event�	Condition�	Semaphore�BoundedSemaphore�Barrier�N�)�
exceptions)�mixinsc� �\rSrSrSrSrSrg)�_ContextManagerMixin�c��@# �UR5IShv�N gN7f�N)�acquire��selfs �4/opt/alt/python313/lib64/python3.13/asyncio/locks.py�
__aenter__�_ContextManagerMixin.__aenter__
s����l�l�n����	�s���c��,# �UR5 g7fr)�release)r�exc_type�exc�tbs    r�	__aexit__�_ContextManagerMixin.__aexit__s�������s��N)�__name__�
__module__�__qualname__�__firstlineno__rr�__static_attributes__r�rr
r
s���r$r
c�J^�\rSrSrSrSrU4SjrSrSrSr	Sr
S	rU=r$)
r�a�Primitive lock objects.

A primitive lock is a synchronization primitive that is not owned
by a particular task when locked.  A primitive lock is in one
of two states, 'locked' or 'unlocked'.

It is created in the unlocked state.  It has two basic methods,
acquire() and release().  When the state is unlocked, acquire()
changes the state to locked and returns immediately.  When the
state is locked, acquire() blocks until a call to release() in
another task changes it to unlocked, then the acquire() call
resets it to locked and returns.  The release() method should only
be called in the locked state; it changes the state to unlocked
and returns immediately.  If an attempt is made to release an
unlocked lock, a RuntimeError will be raised.

When more than one task is blocked in acquire() waiting for
the state to turn to unlocked, only one task proceeds when a
release() call resets the state to unlocked; successive release()
calls will unblock tasks in FIFO order.

Locks also support the asynchronous context management protocol.
'async with lock' statement should be used.

Usage:

    lock = Lock()
    ...
    await lock.acquire()
    try:
        ...
    finally:
        lock.release()

Context manager usage:

    lock = Lock()
    ...
    async with lock:
         ...

Lock objects can be tested for locking state:

    if not lock.locked():
       await lock.acquire()
    else:
       # lock is acquired
       ...

c� �SUlSUlg�NF)�_waiters�_lockedrs r�__init__�
Lock.__init__Ks����
���r$c�>�[TU]5nUR(aSOSnUR(aUS[	UR53nSUSSSUS3$�	N�locked�unlocked�
, waiters:�<r	���� [�]>)�super�__repr__r*r)�len�r�res�extra�	__class__s   �rr7�
Lock.__repr__OsY����g�� �� �L�L��j���=�=��g�Z��D�M�M�(:�';�<�E��3�q��9�+�R��w�b�)�)r$c��UR$)z Return True if lock is acquired.)r*rs rr/�Lock.lockedVs���|�|�r$c��n# �UR(d6URb![SUR55(aSUlgURc[R"5UlUR5R
5nURRU5 UIShv�N URRU5 SUlgN'!URRU5 f=f![Ra# UR(dUR5 ef=f7f)ziAcquire a lock.

This method blocks until the lock is unlocked, then sets it to
locked and returns True.
Nc3�@# �UHoR5v� M g7fr��	cancelled��.0�ws  r�	<genexpr>�Lock.acquire.<locals>.<genexpr>cs���9�=�a�K�K�M�M�=�s�T)r*r)�all�collections�deque�	_get_loop�
create_future�append�remover
�CancelledError�_wake_up_first�r�futs  rr�Lock.acquireZs�������$�-�-�"7��9�4�=�=�9�9�9��D�L���=�=� �'�-�-�/�D�M��n�n��,�,�.���
�
���S�!�
	�
*��	�	��
�
�$�$�S�)��������
�
�$�$�S�)���(�(�	��<�<��#�#�%��	�sB�B(D5�,C�1C�2C�6C;�D5�C�C8�8C;�;7D2�2D5c�j�UR(aSUlUR5 g[S5e)aRelease a lock.

When the lock is locked, reset it to unlocked, and return.
If any other tasks are blocked waiting for the lock to become
unlocked, allow exactly one of them to proceed.

When invoked on an unlocked lock, a RuntimeError is raised.

There is no return value.
FzLock is not acquired.N)r*rQ�RuntimeErrorrs rr�Lock.releases*���<�<� �D�L����!��6�7�7r$c���UR(dg[[UR55nUR	5(dURS5 gg![a gf=f)z*Ensure that the first waiter will wake up.NT)r)�next�iter�
StopIteration�done�
set_resultrRs  rrQ�Lock._wake_up_first�sV���}�}��	��t�D�M�M�*�+�C�
�x�x�z�z��N�N�4� ���	�	��	�s�A�
A'�&A')r*r))
rr r!r"�__doc__r+r7r/rrrQr#�
__classcell__�r<s@rrrs-���1�f�*��#�J8�"!�!r$rc�J^�\rSrSrSrSrU4SjrSrSrSr	Sr
S	rU=r$)
r�aAsynchronous equivalent to threading.Event.

Class implementing event objects. An event manages a flag that can be set
to true with the set() method and reset to false with the clear() method.
The wait() method blocks until the flag is true. The flag is initially
false.
c�F�[R"5UlSUlgr()rJrKr)�_valuers rr+�Event.__init__�s��#�)�)�+��
���r$c�>�[TU]5nUR(aSOSnUR(aUS[	UR53nSUSSSUS3$)	N�set�unsetr1r2r	r3r4r5)r6r7rer)r8r9s   �rr7�Event.__repr__�sY����g�� ������'���=�=��g�Z��D�M�M�(:�';�<�E��3�q��9�+�R��w�b�)�)r$c��UR$)z5Return True if and only if the internal flag is true.�rers r�is_set�Event.is_set�s���{�{�r$c��UR(dCSUlURH+nUR5(aMURS5 M- gg)z�Set the internal flag to true. All tasks waiting for it to
become true are awakened. Tasks that call wait() once the flag is
true will not block at all.
TN)rer)r\r]rRs  rrh�	Event.set�s<��
�{�{��D�K��}�}���x�x�z�z��N�N�4�(�%�r$c��SUlg)z�Reset the internal flag to false. Subsequently, tasks calling
wait() will block until set() is called to set the internal flag
to true again.FNrlrs r�clear�Event.clear�s����r$c��4# �UR(agUR5R5nURR	U5 UIShv�N URRU5 gN!!URRU5 f=f7f)z�Block until the internal flag is true.

If the internal flag is true on entry, return True
immediately.  Otherwise, block until another task calls
set() to set the flag to true, then return True.
TN)rerLrMr)rNrOrRs  r�wait�
Event.wait�ss����;�;���n�n��,�,�.���
�
���S�!�	&��I�I���M�M� � ��%�
��
�M�M� � ��%�s0�AB�A8�A6�A8�B�6A8�8B�B�rer))
rr r!r"r_r+r7rmrhrrrur#r`ras@rrr�s+�����*��
)��&�&r$rc�X^�\rSrSrSrSSjrU4SjrSrSrSSjr	Sr
S	rS
rU=r
$)
r��aAsynchronous equivalent to threading.Condition.

This class implements condition variable objects. A condition variable
allows one or more tasks to wait until they are notified by another
task.

A new Lock object is created and used as the underlying lock.
c���Uc
[5nXlURUlURUlURUl[
R"5Ulgr)r�_lockr/rrrJrKr))r�locks  rr+�Condition.__init__�sD���<��6�D��
��k�k����|�|����|�|���#�)�)�+��
r$c�>�[TU]5nUR5(aSOSnUR(aUS[	UR53nSUSSSUS3$r.)r6r7r/r)r8r9s   �rr7�Condition.__repr__�s]����g�� �� �K�K�M�M��z���=�=��g�Z��D�M�M�(:�';�<�E��3�q��9�+�R��w�b�)�)r$c��# �UR5(d[S5eUR5R5nUR	5 UR
R
U5 UIShv�N UR
RU5 SnUR5IShv�N UbUegNDN![RanUnSnAOSnAff=fMJ!Snf=f!UR
RU5 f=f!SnUR5IShv�N O%![RanUnSnAOSnAff=fM@Ub
Ue!Snf=ff=f![a URS5 ef=f7f)a�Wait until notified.

If the calling task has not acquired the lock when this
method is called, a RuntimeError is raised.

This method releases the underlying lock, and then blocks
until it is awakened by a notify() or notify_all() call for
the same condition variable in another task.  Once
awakened, it re-acquires the lock and returns True.

This method may return spuriously,
which is why the caller should always
re-check the state and be prepared to wait() again.
zcannot wait on un-acquired lockNTr	)
r/rVrLrMrr)rNrOrr
rP�
BaseException�_notify)rrS�err�es    rru�Condition.wait�sv����{�{�}�}��@�A�A��n�n��,�,�.������!	�
#��
�
�$�$�S�)�.��I�I���M�M�(�(��-���� �"�l�l�n�,�,���?�#�!�	�#�#�-��%�4�4� ���� ��	��#���%�M�M�(�(��-����� �"�l�l�n�,�,���%�4�4� ���� ��	��?�#�!�	��"���	#��
�	�
�L�L��O��	�s��AE>�D	�/C)�4B9�5C)�:D	�E�B=�,B;�-B=�1E�6C"�8E>�9C)�;B=�=C�C�E�C�E�"C&�&E�)D�D	�	E�D(�!D$�"D(�'E�(E�<E�>E�E�E�E�E�E�E�E;�;E>c��~# �U"5nU(d(UR5IShv�N U"5nU(dM(U$N7f)z�Wait until a predicate becomes true.

The predicate should be a callable whose result will be
interpreted as a boolean value.  The method will repeatedly
wait() until it evaluates to true.  The final predicate value is
the return value.
N�ru)r�	predicate�results   r�wait_for�Condition.wait_for/s:��������)�)�+����[�F��&��
�
�s�"=�;�=�=c�f�UR5(d[S5eURU5 g)a�By default, wake up one task waiting on this condition, if any.
If the calling task has not acquired the lock when this method
is called, a RuntimeError is raised.

This method wakes up n of the tasks waiting for the condition
 variable; if fewer than n are waiting, they are all awoken.

Note: an awakened task does not actually return from its
wait() call until it can reacquire the lock. Since notify() does
not release the lock, its caller should.
z!cannot notify on un-acquired lockN)r/rVr�)r�ns  r�notify�Condition.notify=s&���{�{�}�}��B�C�C����Q�r$c��SnURH7nX!:�a gUR5(aM!US-
nURS5 M9 g)Nrr	F)r)r\r])rr��idxrSs    rr��Condition._notifyMs=�����=�=�C��x���8�8�:�:��q������u�%�
!r$c�L�UR[UR55 g)z�Wake up all threads waiting on this condition. This method acts
like notify(), but wakes up all waiting threads instead of one. If the
calling thread has not acquired the lock when this method is called,
a RuntimeError is raised.
N)r�r8r)rs r�
notify_all�Condition.notify_allWs��	
���C��
�
�&�'r$)r{r)rr/rr�r	)rr r!r"r_r+r7rur�r�r�r�r#r`ras@rrr�s1����
,�*�5�n�� &�(�(r$rc�N^�\rSrSrSrS
SjrU4SjrSrSrSr	Sr
S	rU=r$)ri`a�A Semaphore implementation.

A semaphore manages an internal counter which is decremented by each
acquire() call and incremented by each release() call. The counter
can never go below zero; when acquire() finds that it is zero, it blocks,
waiting until some other thread calls release().

Semaphores also support the context management protocol.

The optional argument gives the initial value for the internal
counter; it defaults to 1. If the value given is less than 0,
ValueError is raised.
c�@�US:a[S5eSUlXlg)Nrz$Semaphore initial value must be >= 0)�
ValueErrorr)re)r�values  rr+�Semaphore.__init__os!���1�9��C�D�D���
��r$c��>�[TU]5nUR5(aSOSUR3nUR(aUS[UR53nSUSSSUS3$)	Nr/zunlocked, value:r1r2r	r3r4r5)r6r7r/rer)r8r9s   �rr7�Semaphore.__repr__usi����g�� �� �K�K�M�M��1A�$�+�+��/O���=�=��g�Z��D�M�M�(:�';�<�E��3�q��9�+�R��w�b�)�)r$c�x�URS:H=(d% [SUR=(d S55$)z9Returns True if semaphore cannot be acquired immediately.rc3�J# �UHoR5(+v� M g7frrBrDs  rrG�#Semaphore.locked.<locals>.<genexpr>�s���A�,?�a�K�K�M�!�!�,?�s�!#r)re�anyr)rs rr/�Semaphore.locked|s6���{�{�a��C��A�D�M�M�,?�R�,?�A�A�	Cr$c��T# �UR5(dU=RS-slgURc[R"5UlUR5R
5nURRU5 UIShv�N URRU5 URS:�a)UR5(dgURS:�aM)gNZ!URRU5 f=f![RaA UR5(a*UR5(dU=RS-
slef=f!URS:�a)UR5(dfURS:�aM(ff=f7f)aAcquire a semaphore.

If the internal counter is larger than zero on entry,
decrement it by one and return True immediately.  If it is
zero on entry, block, waiting until some other task has
called release() to make it larger than 0, and then return
True.
r	TNr)r/rer)rJrKrLrMrNrOr
rPr\rC�
_wake_up_nextrRs  rr�Semaphore.acquire�s<����{�{�}�}��K�K�1��K���=�=� �'�-�-�/�D�M��n�n��,�,�.���
�
���S�!�	�
*��	�	��
�
�$�$�S�)��+�+��/��)�)�+�+����+�+��/��'���
�
�$�$�S�)���(�(�	��x�x�z�z�#�-�-�/�/�
���q� ���	���+�+��/��)�)�+�+���+�+��/�s[�BF(�C2�C0�C2�D�67F(�/F(�0C2�2D�D�AE'�'E*�*7F%�#F%�%F(c�N�U=RS-
slUR5 g)z�Release a semaphore, incrementing the internal counter by one.

When it was zero on entry and another task is waiting for it to
become larger than zero again, wake up that task.
r	N)rer�rs rr�Semaphore.release�s��	
���q������r$c���UR(dgURH@nUR5(aMU=RS-slURS5  g g)z)Wake up the first waiter that isn't done.Fr	T)r)r\rer]rRs  rr��Semaphore._wake_up_next�sG���}�}���=�=�C��8�8�:�:����q� �����t�$��!�r$rwr�)
rr r!r"r_r+r7r/rrr�r#r`ras@rrr`s-�����*�C�(�T��r$rc�<^�\rSrSrSrSU4SjjrU4SjrSrU=r$)ri�z�A bounded semaphore implementation.

This raises ValueError in release() if it would increase the value
above the initial value.
c�0>�Xl[TU]	U5 gr)�_bound_valuer6r+)rr�r<s  �rr+�BoundedSemaphore.__init__�s���!��
����r$c�l>�URUR:�a[S5e[TU]5 g)Nz(BoundedSemaphore released too many times)rer�r�r6r)rr<s �rr�BoundedSemaphore.release�s+����;�;�$�+�+�+��G�H�H�
���r$)r�r�)	rr r!r"r_r+rr#r`ras@rrr�s���� ��r$rc�$�\rSrSrSrSrSrSrSrg)�
_BarrierStatei��filling�draining�	resetting�brokenrN)	rr r!r"�FILLING�DRAINING�	RESETTING�BROKENr#rr$rr�r��s���G��H��I�
�Fr$r�c�^�\rSrSrSrSrU4SjrSrSrSr	Sr
S	rS
rSr
SrS
r\S5r\S5r\S5rSrU=r$)ri�z�Asyncio equivalent to threading.Barrier

Implements a Barrier primitive.
Useful for synchronizing a fixed number of tasks at known synchronization
points. Tasks block on 'wait()' and are simultaneously awoken once they
have all made their call.
c��US:a[S5e[5UlXl[R
UlSUlg)z1Create a barrier, initialised to 'parties' tasks.r	zparties must be > 0rN)r�r�_cond�_partiesr�r��_state�_count)r�partiess  rr+�Barrier.__init__�s7���Q�;��2�3�3��[��
��
�#�+�+�����r$c��>�[TU]5nURRnUR(dUSUR
SUR3-
nSUSSSUS3$)Nr1�/r2r	r3r4r5)r6r7r�r�r��	n_waitingr�r9s   �rr7�Barrier.__repr__�sd����g�� ���;�;�$�$�%���{�{��z�$�.�.�!1��4�<�<�.�A�A�E��3�q��9�+�R��w�b�)�)r$c��># �UR5IShv�N$N7frr�rs rr�Barrier.__aenter__�s����Y�Y�[� � � �s���c��# �g7frr)r�argss  rr�Barrier.__aexit__�s����s�c��<# �URIShv�N UR5IShv�N URnU=RS-
slUS-UR:XaUR	5IShv�N OUR5IShv�N UU=RS-slUR
5 sSSS5IShv�N $N�N�NYNBN
!U=RS-slUR
5 f=f!,IShv�N(df   g=f7f)z�Wait for the barrier.

When the specified number of tasks have started waiting, they are all
simultaneously awoken.
Returns an unique and individual index number from 0 to 'parties-1'.
Nr	)r��_blockr�r��_release�_wait�_exit)r�indexs  rru�Barrier.wait�s�����:�:�:��+�+�-���
��������q� ���1�9��
�
�-��-�-�/�)�)��*�*�,�&�&�����q� ���
�
���:�:��*�&������q� ���
�
����:�:�s��D�C�D�D�C�D�AC�8C�9C�C�C�%D�<D�C�	D�D�C�C�D�'C?�?D�D�D�	D�Dc���^# �TRRU4Sj5IShv�N TR[RLa[
R"S5egN87f)Nc�^>�TR[R[R4;$r)r�r�r�r�rs�r�<lambda>� Barrier._block.<locals>.<lambda>s$���D�K�K��&�&�
�(?�(?�(�r$zBarrier aborted)r�r�r�r�r�r
�BrokenBarrierErrorrs`rr��Barrier._blocksY�����j�j�!�!�
�
�	
�	
��;�;�-�.�.�.��/�/�0A�B�B�/�	
�s�#A!�A�9A!c��j# �[RUlURR	5 g7fr)r�r�r�r�r�rs rr��Barrier._release&s$���
$�,�,����
�
����s�13c���^# �TRRU4Sj5IShv�N TR[R[R
4;a[R"S5egNI7f)Nc�<>�TR[RL$r)r�r�r�rs�rr��Barrier._wait.<locals>.<lambda>4s���$�+�+�]�=R�=R�*Rr$zAbort or reset of barrier)r�r�r�r�r�r�r
r�rs`rr��
Barrier._wait.s\�����j�j�!�!�"R�S�S�S��;�;�=�/�/��1H�1H�I�I��/�/�0K�L�L�J�	T�s�#A2�A0�A
A2c���URS:Xa^UR[R[R4;a[R
UlURR5 gg)Nr)r�r�r�r�r�r�r�r�rs rr��
Barrier._exit9sO���;�;�!���{�{�}�6�6�
�8N�8N�O�O�+�3�3����J�J�!�!�#�r$c��v# �URIShv�N URS:�a3UR[RLa[RUlO[R
UlURR
5 SSS5IShv�N gN�N!,IShv�N(df   g=f7f)zrReset the barrier to the initial state.

Any tasks currently waiting will get the BrokenBarrier exception
raised.
Nr)r�r�r�r�r�r�r�rs r�reset�
Barrier.resetAsg����:�:�:��{�{�Q���;�;�m�&=�&=�=�"/�"9�"9�D�K��+�3�3����J�J�!�!�#��:�:�:�:�:�sE�B9�B�B9�A3B�
B9�B�B9�B9�B6�%B(�&B6�2B9c���# �URIShv�N [RUlURR	5 SSS5IShv�N gNDN!,IShv�N(df   g=f7f)z�Place the barrier into a 'broken' state.

Useful in case of error.  Any currently waiting tasks and tasks
attempting to 'wait()' will have BrokenBarrierError raised.
N)r�r�r�r�r�rs r�abort�
Barrier.abortPs<����:�:�:�'�.�.�D�K��J�J�!�!�#��:�:�:�:�:�sD�A6�A�A6�0A�A6�A�A6�A6�A3�"A%�#A3�/A6c��UR$)z8Return the number of tasks required to trip the barrier.)r�rs rr��Barrier.partiesZs���}�}�r$c�V�UR[RLaUR$g)z<Return the number of tasks currently waiting at the barrier.r)r�r�r�r�rs rr��Barrier.n_waiting_s#���;�;�-�/�/�/��;�;��r$c�:�UR[RL$)z0Return True if the barrier is in a broken state.)r�r�r�rs rr��Barrier.brokenfs���{�{�m�2�2�2�2r$)r�r�r�r�)rr r!r"r_r+r7rrrur�r�r�r�r�r��propertyr�r�r�r#r`ras@rrr�s}����	�*�!�

��.C�  �	M�$�
$�$����������3��3r$r)r_�__all__rJ�enum�r
rr
�_LoopBoundMixinrrrrr�Enumr�rrr$r�<module>r�s���!�*��������D!���!7�!7�D!�N:&�F�"�"�:&�zB(�$�f�&<�&<�B(�J`�$�f�&<�&<�`�F�y��$�D�I�I��M3�f�$�$�M3r$
© 2025 GrazzMean-Shell