/usr/local/lib64/python3.6/site-packages/aiohttp/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/aiohttp/__pycache__/locks.cpython-36.pyc (1582B)
3
8%Egp ã @ s6 d dl Z d dlZd dlmZmZmZ G dd„ dƒZdS )é N)ÚAnyÚDequeÚOptionalc @ sT e Zd ZdZejddœdd„Zdee ddœdd„Z e
d œd
d„Zdd œdd
„ZdS )ÚEventResultOrErrorzÓEvent asyncio lock helper class.
Wraps the Event asyncio lock allowing either to awake the
locked Tasks without any error or raising an exception.
thanks to @vorpalsmith for the simple design.
N)ÚloopÚreturnc C s$ || _ d | _tjƒ | _tjƒ | _d S )N)Ú_loopÚ_excÚasyncioÚEventÚ_eventÚcollectionsÚdequeÚ_waiters)Úselfr © r ú9/usr/local/lib64/python3.6/site-packages/aiohttp/locks.pyÚ__init__ s
zEventResultOrError.__init__)Úexcr c C s || _ | jjƒ d S )N)r r Úset)r r r r r r s zEventResultOrError.set)r c à sP | j j| jjƒ ƒ}| jj|ƒ z|I d H }W d | jj|ƒ X | jd k rL| j‚|S )N)r Úcreate_taskr Úwaitr ÚappendÚremover )r ÚwaiterÚvalr r r r s
zEventResultOrError.waitc C s x| j D ]}|jƒ qW dS )zCancel all waitersN)r Úcancel)r r r r r r &