Syncronization object.
More...
#include <B2BITS_AutoEvent.h>
|
| AutoEvent (bool signaled=false) |
| Default constructor.
|
|
void | reset () |
| Sets the state of the event to nonsignaled, causing waiting threads to block.
|
|
void | set () |
| Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
|
|
void | wait () |
| Blocks the current thread until event is set to signaled state After method return event is automatically set to nonsignaled state.
|
|
bool | wait (unsigned int msec) |
| Blocks the current thread until event is set to signaled state or timeout.
|
|
virtual | ~AutoEvent () |
| Destructor.
|
|
Syncronization object.
Notifies a waiting thread that an event has occurred.
◆ AutoEvent()
System::AutoEvent::AutoEvent |
( |
bool | signaled = false | ) |
|
|
explicit |
◆ ~AutoEvent()
virtual System::AutoEvent::~AutoEvent |
( |
| ) |
|
|
virtual |
◆ reset()
void System::AutoEvent::reset |
( |
| ) |
|
Sets the state of the event to nonsignaled, causing waiting threads to block.
◆ set()
void System::AutoEvent::set |
( |
| ) |
|
Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
◆ wait() [1/2]
void System::AutoEvent::wait |
( |
| ) |
|
Blocks the current thread until event is set to signaled state After method return event is automatically set to nonsignaled state.
◆ wait() [2/2]
bool System::AutoEvent::wait |
( |
unsigned int | msec | ) |
|
Blocks the current thread until event is set to signaled state or timeout.
If method returns true, event is automatically set to nonsignaled state.
- Returns
- true if event is set to signaled state; false if time is out.
◆ cond_
pthread_cond_t System::AutoEvent::cond_ |
|
protected |
◆ mutex_
pthread_mutex_t System::AutoEvent::mutex_ |
|
protected |
◆ signaled_
volatile int System::AutoEvent::signaled_ |
|
protected |