Viewing File: /opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/signals.cpython-38.pyc
U
'â7`T ã @ s$ d dl mZ dZG dd„ deƒZdS )é )Ú
FrozenList)ÚSignalc s4 e Zd ZdZdZ‡ fdd„Zdd„ Zdd„ Z‡ ZS ) r z¼Coroutine-based signal implementation.
To connect a callback to a signal, use any list method.
Signals are fired using the send() coroutine, which takes named
arguments.
)Ú_ownerc s t ƒ ¡ || _d S )N)ÚsuperÚ__init__r )ÚselfÚowner©Ú __class__© úB/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/signals.pyr s
zSignal.__init__c C s d | j| jt| ƒ¡S )Nz"<Signal owner={}, frozen={}, {!r}>)Úformatr ÚfrozenÚlist)r r r r Ú__repr__ s
ÿzSignal.__repr__c Ï s, | j stdƒ‚| D ]}|||ŽI dH qdS )z9
Sends data to all registered receivers.
zCannot send non-frozen signal.N)r ÚRuntimeError)r ÚargsÚkwargsZreceiverr r r Úsend s zSignal.send) Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú __slots__r r r Ú
__classcell__r r r r r s
r N)Zaiohttp.frozenlistr Ú__all__r r r r r Ú<module> s
Back to Directory
File Manager