e7&:D9 D d dl Z d dlZd dlmZmZmZ G d d ZdS ) N)AnyDequeOptionalc ^ e Zd ZdZdej ddfdZd dee ddfdZ de fdZdd ZdS )EventResultOrErrorzEvent 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. loopreturnNc || _ d | _ t j | _ t j | _ d S N)_loop_excasyncioEvent_eventcollectionsdeque_waiters)selfr s a/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/aiohttp/locks.py__init__zEventResultOrError.__init__ s1 -1 moo4?4E4G4G excc F || _ | j d S r )r r set)r r s r r zEventResultOrError.set s! r c B K | j | j }| j | | d {V }| j | n# | j | w xY w| j | j |S r )r create_taskr waitr appendremover )r waitervals r r zEventResultOrError.wait s ''(8(8(:(:;; V$$$ ),,,,,,CM ((((DM ((((9 )O s A2 2Bc B | j D ]}| dS )zCancel all waitersN)r cancel)r r s r r# zEventResultOrError.cancel&