Viewing File: /opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/locks.cpython-38.pyc

U

'â7`Äã@sdddlZddlZddlmZmZzddlmZWn ek
rPddlmZYnXGdd„dƒZdS)éN)ÚAnyÚOptional)ÚDequec@sTeZdZdZejddœdd„Zdeeddœdd„Z	e
d	œd
d„Zdd	œdd
„ZdS)ÚEventResultOrErrorz½
    This class wrappers the Event asyncio lock allowing either awake the
    locked Tasks without any error or raising an exception.

    thanks to @vorpalsmith for the simple design.
    N)ÚloopÚreturncCs$||_d|_t ¡|_t ¡|_dS©N)Ú_loopÚ_excÚasyncioZEventÚ_eventÚcollectionsÚdequeÚ_waiters)Úselfr©rú@/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/locks.pyÚ__init__s
zEventResultOrError.__init__)ÚexcrcCs||_|j ¡dSr)r
rÚset)rrrrrrszEventResultOrError.set)rc	ÃsP|j |j ¡¡}|j |¡z|IdH}W5|j |¡X|jdk	rL|j‚|Sr)r	Zcreate_taskrÚwaitrÚappendÚremover
)rÚwaiterÚvalrrrrs
zEventResultOrError.waitcCs|jD]}| ¡qdS)z Cancel all waiters N)rÚcancel)rrrrrr*s
zEventResultOrError.cancel)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__rZAbstractEventLooprrÚ
BaseExceptionrrrrrrrrrs

r)	rr
ÚtypingrrrÚImportErrorZtyping_extensionsrrrrrÚ<module>s
Back to Directory File Manager