kafka_dae_control.event_with_value

Module containing utilities for passing events between threads with an exception or value.

Members

EventWithValue

Create the event object.

class kafka_dae_control.event_with_value.EventWithValue[source]

Bases: Generic

Create the event object.

property err: Exception | None

Get the exception.

Returns: The exception.

set() None[source]

Directly set on the event.

property value: T | None

The value.

Returns: The value.

wait() T | None[source]

Wait for the event to be set.

Either return the current value if there is one, or raise if there is an exception.

Returns: The current value if there is one.