EventManager
Hierarchy
- EventManager
Index
Methods
Properties
Methods
__aenter__
Initialize the event manager upon entering the async context.
Returns EventManager
__aexit__
Close the local event manager upon exiting the async context.
This will stop listening for the events, and it will wait for all the event listeners to finish.
Parameters
exc_type: type[BaseException] | None
exc_value: BaseException | None
exc_traceback: TracebackType | None
Returns None
__init__
Initialize a new instance.
Parameters
optionalkeyword-onlypersist_state_interval: timedelta = timedelta(minutes=1)
Interval between emitted
PersistState
events to maintain state persistence.optionalkeyword-onlyclose_timeout: timedelta | None = None
Optional timeout for canceling pending event listeners if they exceed this duration.
Returns None
Properties
active
Indicate whether the context is active.
Manage events and their listeners, enabling registration, emission, and execution control.
It allows for registering event listeners, emitting events, and ensuring all listeners complete their execution. Built on top of
pyee.asyncio.AsyncIOEventEmitter
. It implements additional features such as waiting for all listeners to complete and emittingPersistState
events at regular intervals.