callbacks

class async_patterns.callbacks.Callbacks[source]

Accepts callables objects and stores them in a list, then calls them all when something interesting happens

acall(*args)[source]

This is a coroutine. Trigger a call to each callback and assume each is a coroutine, pass args to each.

add_callback(callable_)[source]

Add callable_ to the list of callbacks. When this class’s Callbacks.__call__() function is called, callable_ will be called with the same arguments passed to that function.

Parameters:callable – a callable object