Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::mt::Event Class Referencefinal

Manual-reset style synchronization primitive for waking a waiting thread. The event stays signaled until reset explicitly. More...

#include <event.h>

Public Member Functions

 Event ()
 Creates an unsignaled event and initializes the underlying pthread objects.
 
 ~Event ()
 Destroys the underlying pthread synchronization objects.
 
void set ()
 Sets the event to the signaled state and wakes one waiting thread.
 
void reset ()
 Resets the event to the unsignaled state.
 
GAIA_NODISCARD bool is_set ()
 Checks whether the event currently is in the signaled state.
 
void wait ()
 Blocks the calling thread until the event becomes signaled.
 

Detailed Description

Manual-reset style synchronization primitive for waking a waiting thread. The event stays signaled until reset explicitly.

Member Function Documentation

◆ is_set()

GAIA_NODISCARD bool gaia::mt::Event::is_set ( )
inline

Checks whether the event currently is in the signaled state.

Returns
True when the event is signaled.

The documentation for this class was generated from the following file: