/opt/imh-python/lib/python3.9/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-39.opt-1.pyc518380644editdlrm
base_events.cpython-39.opt-2.pyc428090644editdlrm
base_events.cpython-39.pyc520330644editdlrm
base_futures.cpython-39.opt-1.pyc19190644editdlrm
base_futures.cpython-39.opt-2.pyc16650644editdlrm
base_futures.cpython-39.pyc19190644editdlrm
base_subprocess.cpython-39.opt-1.pyc93510644editdlrm
base_subprocess.cpython-39.opt-2.pyc92510644editdlrm
base_subprocess.cpython-39.pyc94210644editdlrm
base_tasks.cpython-39.opt-1.pyc19550644editdlrm
base_tasks.cpython-39.opt-2.pyc19550644editdlrm
base_tasks.cpython-39.pyc19550644editdlrm
constants.cpython-39.opt-1.pyc5920644editdlrm
constants.cpython-39.opt-2.pyc5920644editdlrm
constants.cpython-39.pyc5920644editdlrm
coroutines.cpython-39.opt-1.pyc65840644editdlrm
coroutines.cpython-39.opt-2.pyc63520644editdlrm
coroutines.cpython-39.pyc66480644editdlrm
events.cpython-39.opt-1.pyc280300644editdlrm
events.cpython-39.opt-2.pyc189330644editdlrm
events.cpython-39.pyc281120644editdlrm
exceptions.cpython-39.opt-1.pyc25640644editdlrm
exceptions.cpython-39.opt-2.pyc19200644editdlrm
exceptions.cpython-39.pyc25640644editdlrm
format_helpers.cpython-39.opt-1.pyc23350644editdlrm
format_helpers.cpython-39.opt-2.pyc20910644editdlrm
format_helpers.cpython-39.pyc23350644editdlrm
futures.cpython-39.opt-1.pyc116890644editdlrm
futures.cpython-39.opt-2.pyc81830644editdlrm
futures.cpython-39.pyc118400644editdlrm
locks.cpython-39.opt-1.pyc144400644editdlrm
locks.cpython-39.opt-2.pyc82020644editdlrm
locks.cpython-39.pyc144400644editdlrm
log.cpython-39.opt-1.pyc2370644editdlrm
log.cpython-39.opt-2.pyc1980644editdlrm
log.cpython-39.pyc2370644editdlrm
proactor_events.cpython-39.opt-1.pyc241300644editdlrm
proactor_events.cpython-39.opt-2.pyc237300644editdlrm
proactor_events.cpython-39.pyc243600644editdlrm
protocols.cpython-39.opt-1.pyc86250644editdlrm
protocols.cpython-39.opt-2.pyc33660644editdlrm
protocols.cpython-39.pyc86250644editdlrm
queues.cpython-39.opt-1.pyc85270644editdlrm
queues.cpython-39.opt-2.pyc58480644editdlrm
queues.cpython-39.pyc85270644editdlrm
runners.cpython-39.opt-1.pyc22170644editdlrm
runners.cpython-39.opt-2.pyc15350644editdlrm
runners.cpython-39.pyc22170644editdlrm
selector_events.cpython-39.opt-1.pyc297980644editdlrm
selector_events.cpython-39.opt-2.pyc281520644editdlrm
selector_events.cpython-39.pyc298420644editdlrm
sslproto.cpython-39.opt-1.pyc214030644editdlrm
sslproto.cpython-39.opt-2.pyc146000644editdlrm
sslproto.cpython-39.pyc215670644editdlrm
staggered.cpython-39.opt-1.pyc40180644editdlrm
staggered.cpython-39.opt-2.pyc18850644editdlrm
staggered.cpython-39.pyc41710644editdlrm
streams.cpython-39.opt-1.pyc203700644editdlrm
streams.cpython-39.opt-2.pyc144760644editdlrm
streams.cpython-39.pyc205970644editdlrm
subprocess.cpython-39.opt-1.pyc73310644editdlrm
subprocess.cpython-39.opt-2.pyc72030644editdlrm
subprocess.cpython-39.pyc73450644editdlrm
tasks.cpython-39.opt-1.pyc241600644editdlrm
tasks.cpython-39.opt-2.pyc169090644editdlrm
tasks.cpython-39.pyc242000644editdlrm
threads.cpython-39.opt-1.pyc9890644editdlrm
threads.cpython-39.opt-2.pyc5230644editdlrm
threads.cpython-39.pyc9890644editdlrm
transports.cpython-39.opt-1.pyc122430644editdlrm
transports.cpython-39.opt-2.pyc68420644editdlrm
transports.cpython-39.pyc122570644editdlrm
trsock.cpython-39.opt-1.pyc85800644editdlrm
trsock.cpython-39.opt-2.pyc83240644editdlrm
trsock.cpython-39.pyc85800644editdlrm
unix_events.cpython-39.opt-1.pyc417460644editdlrm
unix_events.cpython-39.opt-2.pyc365230644editdlrm
unix_events.cpython-39.pyc420660644editdlrm
windows_events.cpython-39.opt-1.pyc246300644editdlrm
windows_events.cpython-39.opt-2.pyc235230644editdlrm
windows_events.cpython-39.pyc246460644editdlrm
windows_utils.cpython-39.opt-1.pyc44460644editdlrm
windows_utils.cpython-39.opt-2.pyc40120644editdlrm
windows_utils.cpython-39.pyc45140644editdlrm
__init__.cpython-39.opt-1.pyc7900644editdlrm
__init__.cpython-39.opt-2.pyc7340644editdlrm
__init__.cpython-39.pyc7900644editdlrm
__main__.cpython-39.opt-1.pyc31790644editdlrm
__main__.cpython-39.opt-2.pyc31790644editdlrm
__main__.cpython-39.pyc31790644editdlrm
Edit: /opt/imh-python/lib/python3.9/asyncio/__pycache__/locks.cpython-39.pyc (14440B)
a bhe:@sdZdZddlZddlZddlmZddlmZGdddZGd d d eZGd d d Z Gd ddeZ GdddeZ Gddde Z dS)zSynchronization primitives.)LockEvent Condition SemaphoreBoundedSemaphoreN)events) exceptionsc@seZdZddZddZdS)_ContextManagerMixincs|IdHdSN)acquireselfr./opt/imh-python/lib/python3.9/asyncio/locks.py __aenter__ sz_ContextManagerMixin.__aenter__cs |dSr )release)rexc_typeexctbrrr __aexit__sz_ContextManagerMixin.__aexit__N)__name__ __module__ __qualname__rrrrrrr sr csNeZdZdZddddZfddZdd Zd d Zd d ZddZ Z S)raPrimitive lock objects. A primitive lock is a synchronization primitive that is not owned by a particular coroutine 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 coroutine 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 coroutine is blocked in acquire() waiting for the state to turn to unlocked, only one coroutine proceeds when a release() call resets the state to unlocked; first coroutine which is blocked in acquire() is being processed. acquire() is a coroutine and should be called with 'await'. 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 ... NloopcCs:d|_d|_|dur t|_n||_tjdtdddSNF[The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. stacklevel)_waiters_lockedrget_event_loop_loopwarningswarnDeprecationWarningrrrrr__init__Ms z Lock.__init__csLt}|jrdnd}|jr2|dt|j}d|ddd|dS Nlockedunlocked , waiters:)super__repr__r"r!lenrresextra __class__rrr3Xs  z Lock.__repr__cCs|jS)z Return True if lock is acquired.)r"r rrrr+_sz Lock.lockedc s|js.|jdus$tdd|jDr.d|_dS|jdurBt|_|j}|j|z.z|IdHW|j|n|j|0Wn$t j y|js| Yn0d|_dS)zAcquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. Ncss|]}|VqdSr ) cancelled).0wrrr jzLock.acquire..T) r"r!all collectionsdequer$ create_futureappendremover CancelledError_wake_up_firstrfutrrrr cs&      z Lock.acquirecCs"|jrd|_|ntddS)aGRelease a lock. When the lock is locked, reset it to unlocked, and return. If any other coroutines 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"rF RuntimeErrorr rrrrs  z Lock.releasecCsH|js dSztt|j}Wnty0YdS0|sD|ddS)z*Wake up the first waiter if it isn't done.NT)r!nextiter StopIterationdone set_resultrGrrrrFs zLock._wake_up_first) rrr__doc__r)r3r+r rrF __classcell__rrr8rrs5  rcsNeZdZdZddddZfddZdd Zd d Zd d ZddZ Z S)ra#Asynchronous 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. NrcCs>t|_d|_|dur$t|_n||_tjdt dddSr) r@rAr!_valuerr#r$r%r&r'r(rrrr)s  zEvent.__init__csLt}|jrdnd}|jr2|dt|j}d|ddd|dS) NsetZunsetr-r.rr/r0r1)r2r3rQr!r4r5r8rrr3s  zEvent.__repr__cCs|jS)z5Return True if and only if the internal flag is true.rQr rrris_setsz Event.is_setcCs.|js*d|_|jD]}|s|dqdS)zSet the internal flag to true. All coroutines waiting for it to become true are awakened. Coroutine that call wait() once the flag is true will not block at all. TN)rQr!rMrNrGrrrrRs  z Event.setcCs d|_dS)zReset the internal flag to false. Subsequently, coroutines calling wait() will block until set() is called to set the internal flag to true again.FNrSr rrrclearsz Event.clearc sP|jr dS|j}|j|z|IdHW|j|dS|j|0dS)zBlock until the internal flag is true. If the internal flag is true on entry, return True immediately. Otherwise, block until another coroutine calls set() to set the flag to true, then return True. TN)rQr$rBr!rCrDrGrrrwaits    z Event.wait) rrrrOr)r3rTrRrUrVrPrrr8rrs  rcsReZdZdZdddddZfddZdd Zd d Zdd dZddZ Z S)raAsynchronous equivalent to threading.Condition. This class implements condition variable objects. A condition variable allows one or more coroutines to wait until they are notified by another coroutine. A new Lock object is created and used as the underlying lock. NrcCs~|durt|_n||_tjdtdd|dur>t|d}n|j|jurRtd||_|j |_ |j |_ |j |_ t |_dS)Nrrrrz"loop argument must agree with lock)rr#r$r%r&r'r ValueError_lockr+r rr@rAr!)rlockrrrrr)s   zCondition.__init__csNt}|rdnd}|jr4|dt|j}d|ddd|dSr*)r2r3r+r!r4r5r8rrr3s  zCondition.__repr__cs.|std|z|j}|j|z^|IdHW|j|Wd}z|IdHWqWqPt j y~d}YqP0qP|rt j dS|j|0Wd}z|IdHWqWqt j yd}Yq0q|rt j nHd}z|IdHWqWqt j yd}Yq0q|r(t j 0dS)aWait until notified. If the calling coroutine 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 coroutine. Once awakened, it re-acquires the lock and returns True. zcannot wait on un-acquired lockNFT) r+rIrr$rBr!rCrDr r rE)rrHr:rrrrVsJ         zCondition.waitcs$|}|s |IdH|}q|S)zWait until a predicate becomes true. The predicate should be a callable which result will be interpreted as a boolean value. The final predicate value is the return value. N)rV)r predicateresultrrrwait_for4s zCondition.wait_forrcCsJ|stdd}|jD]*}||kr*qF|s|d7}|dqdS)aBy default, wake up one coroutine waiting on this condition, if any. If the calling coroutine has not acquired the lock when this method is called, a RuntimeError is raised. This method wakes up at most n of the coroutines waiting for the condition variable; it is a no-op if no coroutines are waiting. Note: an awakened coroutine 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 lockrrFN)r+rIr!rMrN)rnidxrHrrrnotifyAs  zCondition.notifycCs|t|jdS)aWake 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_r4r!r rrr notify_allYszCondition.notify_all)N)r) rrrrOr)r3rVr\r_r`rPrrr8rrs  % rcsPeZdZdZdddddZfddZd d Zd d Zd dZddZ Z S)raA 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. rNrcCsN|dkrtd||_t|_|dur4t|_n||_tj dt dddS)Nrz$Semaphore initial value must be >= 0rrr) rWrQr@rAr!rr#r$r%r&r'rvaluerrrrr)qs  zSemaphore.__init__csVt}|rdn d|j}|jr<|dt|j}d|ddd|dS) Nr+zunlocked, value:r-r.rr/r0r1)r2r3r+rQr!r4r5r8rrr3~s  zSemaphore.__repr__cCs,|jr(|j}|s|ddSqdSr )r!popleftrMrN)rwaiterrrr _wake_up_nexts   zSemaphore._wake_up_nextcCs |jdkS)z:Returns True if semaphore can not be acquired immediately.rrSr rrrr+szSemaphore.lockedcst|jdkrb|j}|j|z|IdHWq||jdkrX|sX|Yq0q|jd8_dS)a5Acquire 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 coroutine has called release() to make it larger than 0, and then return True. rNrT)rQr$rBr!rCcancelr:rerGrrrr s    zSemaphore.acquirecCs|jd7_|dS)zRelease a semaphore, incrementing the internal counter by one. When it was zero on entry and another coroutine is waiting for it to become larger than zero again, wake up that coroutine. rN)rQrer rrrrszSemaphore.release)r) rrrrOr)r3rer+r rrPrrr8rrbs rcs4eZdZdZd ddfdd ZfddZZS) rzA bounded semaphore implementation. This raises ValueError in release() if it would increase the value above the initial value. rNrcs.|rtjdtdd||_tj||ddS)Nrrrr)r%r&r' _bound_valuer2r)rar8rrr)s zBoundedSemaphore.__init__cs"|j|jkrtdtdS)Nz(BoundedSemaphore released too many times)rQrgrWr2rr r8rrrs zBoundedSemaphore.release)r)rrrrOr)rrPrrr8rrs r) rO__all__r@r%rr r rrrrrrrrrs   DzN