bec_lib.callback_handler.CallbackEntry#

class CallbackEntry(id: int, event_type: EventType, func: Callable, sync: bool)[source]#

Bases: object

Callback entry class to store callback information

Methods

poll

Run callback.

run

Run the callback function.

Attributes

num_pending_events

number of pending events

property num_pending_events#

number of pending events

poll() None[source]#

Run callback.

Raises:

RuntimeError – Raises if attempt is made to run async callbacks manually.

run(*args, **kwargs) None[source]#

Run the callback function. If sync is True, the callback is run immediately. Otherwise, the callback is added to a queue and exectued in the next poll.