Signal is a list of registered asynchronous callbacks.

The signal’s life-cycle has two stages: after creation it’s content could be filled by using standard list operations: sig.append() etc.

After sig.freeze() call the signal is frozen: adding, removing and dropping callbacks are forbidden.

The only available operation is calling previously registered callbacks by await sig.send(data).

For concrete usage examples see signals in aiohttp.web chapter.

Changed in version 3.0: sig.send() call is forbidden for non-frozen signal.

Support for regular (non-async) callbacks is dropped. All callbacks should be async functions.

class aiohttp.Signal[source]

The signal, implements interface.

coroutine send(*args, **kwargs)[source]

Call all registered callbacks one by one starting from the begin of list.


True if freeze() was called, read-only property.


Freeze the list. After the call any content modification is forbidden.