A class for thread synchronization and mutual exclusion. More...
#include <yarp/os/Event.h>
Classes | |
class | Private |
Public Member Functions | |
Event (bool autoResetAfterWait=true) | |
Constructor. More... | |
virtual | ~Event () |
Destructor. More... | |
void | wait () |
Wait for the event to be signaled. More... | |
void | signal () |
Put the event in a signaled state. More... | |
void | reset () |
Put the event in a reset state. More... | |
A class for thread synchronization and mutual exclusion.
An event can be in a signaled or reset state. Threads can wait for an event to enter a signaled state.
yarp::os::Event::Event | ( | bool | autoResetAfterWait = true | ) |
void yarp::os::Event::reset | ( | ) |
void yarp::os::Event::signal | ( | ) |
void yarp::os::Event::wait | ( | ) |
Wait for the event to be signaled.
If the event was created with autoResetAfterWait set, then after a wait the event will automatically be reset. That means that any other thread waiting for the same event will not be woken up by the signal that wakes up this call to wait().