plumpy.event_helper module#
- class plumpy.event_helper.EventHelper(listener_type: Type[ProcessListener])[source]#
Bases:
Savable- add_listener(listener: ProcessListener) None[source]#
- fire_event(event_function: Callable[[...], Any], *args: Any, **kwargs: Any) None[source]#
Call an event method on all listeners.
- Parameters:
event_function – the method of the ProcessListener
args – arguments to pass to the method
kwargs – keyword arguments to pass to the method
- property listeners: Set[ProcessListener]#
- remove_listener(listener: ProcessListener) None[source]#