��g]P c s` � O o OoOOFoOOFoOOFEo OOFEo O O1 o O O
XXM 1 o O OXM 1 o
O
OXXM 1 o O OXXM 1 o O OX1 o
O OXM 1 o O OXM 1 od)zSynchronization primitives.)�Lock�Event� Condition� Semaphore�BoundedSemaphore�Barrier� N� )�
exceptions)�mixinsc s* [ � X oO oOo j O oO oOoQ od)�_ContextManagerMixini c � s@ � Q M 1 D O e s�I
d I3c�N)�acquire��self� �&/usr/lib64/python3.14/asyncio/locks.py�
__aenter__Z_ContextManagerMixin.__aenter__
s � � ��l�l�n��� � �s ���c � s, � Q M 1 d 3cr )�release)r Zexc_typeZexcZtb� r � __aexit__Z_ContextManagerMixin.__aexit__ s � � �����s �� N)�__name__�
__module__�__qualname__�__firstlineno__r r �__static_attributes__�__classdictcell__)�
__classdict__s @r r
r
s �� � ��� r
c �T [ [� X oO oOo jOoO oQ 0O goO oO oO o O o
O oQoQ 9o
! )
r i 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 s � O Q i OQ i d �NF)�_waiters�_lockedr
r r �__init__Z
Lock.__init__K s � ���
���r c � :� W PQ Z 1 kQ M % ^ OJOkQ M % ^ Q OW Q M 1 /kOQO OQ O/! �N�lockedZunlocked�
, waiters:�<�r i����N� [�]>)�super�__repr__r! r �len�r ZresZextra� __class__� �r r, Z
Lock.__repr__O sW �� ��g�� �� �L�L��j���=�=��g�Z��D�M�M�(:�';�<�E��3�t�9�+�R��w�b�)�)r c � � Q M ! )z Return True if lock is acquired.)r! r
r r r% ZLock.lockedV s � ��|�|�r c � sn � Q M % a6 Q M _! W O Q M 1 1 % ^ OQ i dQ M ` W M 1 Q i Q M 1 M
1 kQ M M Q1 QD Oe s�I
Q M M Q1 OQ i d I' Q M M Q1 c 9 c W M ^# Q M % a Q M 1 b c 9 c3c)ziAcquire a lock.
This method blocks until the lock is unlocked, then sets it to
locked and returns True.
Nc 3 s>