dragon.native.event
The Dragon native event is an object that is used for signaling between threads or processes.
One thread or process signals an event and the other waits. When the waiting thread is signalled, the waiting thread is activated.
Classes
This class implements Event objects with a Dragon channel. |
- class Event
This class implements Event objects with a Dragon channel. The event sends and receives bytes of the message with the respective functions set and clear. Wait is the function that waits for bytes to be written into the channel
- __init__(m_uid: int = 4611686018427387904)
Initialize an event object :param m_uid: memory pool to create the channel in, defaults to _DEF_MUID :type m_uid: int, optional
- set() None
Set the event.
Set writes a messsage into the channel.
- Returns
None
- Return type
NoneType
- is_set() bool
Returns if the event has been set. Polls the channel for the message.
- Returns
Results from a channel poll with a timeout set to 0.
- Return type