ost::Event - The Event class implements a feature originally found in the WIN32 API; event notification.
Contents
Constructor & Destructor Documentation
ost::Event::Event()virtualost::Event::~Event()[virtual]
Detailed Description
The Event class implements a feature originally found in the WIN32 API; event notification.
A target thread waits on a resetable Event, and one or more other threads can then signal the waiting
thread to resume execution. A timeout can be used to specify a wait duration in milliseconds. The Event
class must be reset before it can be used again as a trigger. These event objects use a trigger/reset
mechanism and are related to low level conditional variables.
Author
: David Sugar dyfet@ostel.comThread synchornization on event notification.
Member Function Documentation
voidost::Event::reset(void)
Once signaled, the Event class must be 'reset' before responding to a new signal.
Seealsosignalvoidost::Event::signal(void)
Signal the event for the waiting thread.
boolost::Event::wait(timeout_ttimer)
Wait either for the event to be signaled by another thread or for the specified timeout duration.
SeealsosignalReturns
true if signaled, false if timed out.
Parameterstimer timeout in milliseconds to wait for a signal.
boolost::Event::wait(void)Name
ost::Event - The Event class implements a feature originally found in the WIN32 API; event notification.
Synopsis
#include <thread.h>
PublicMemberFunctionsEvent ()
virtual ~Event ()
void reset (void)
Once signaled, the Event class must be 'reset' before responding to a new signal.
void signal (void)
Signal the event for the waiting thread.
bool wait (timeout_t timer)
Wait either for the event to be signaled by another thread or for the specified timeout duration.
bool wait (void)
