Skip to main content

EventletAdaptedEvent

An adapted eventlet event, designed to match the API of threading.Event and gevent.event.Event.

Attributes​

AttributeTypeDescription
evteventlet.EventThe underlying eventlet Event instance used to manage internal signaling and synchronization.

Constructor​

Signature​

def EventletAdaptedEvent() - > null

Signature​

def EventletAdaptedEvent() - > null

Methods​


is_set()​

@classmethod
def is_set() - > boolean

Checks whether the internal event has been set.

Returns​

TypeDescription
booleanTrue if the event has been set and is ready, False otherwise

set()​

@classmethod
def set() - > null

Sets the internal event, signaling any threads or greenlets waiting on it.

Returns​

TypeDescription
nullNone

wait()​

@classmethod
def wait(
timeout: float = None
) - > any

Blocks until the internal event is set or until the optional timeout expires.

Parameters​

NameTypeDescription
timeoutfloat = NoneThe maximum number of seconds to wait for the event to be set before returning

Returns​

TypeDescription
anyThe value sent to the event, or None if the timeout is reached