#include <TCMTEvent.h>
Public Member Functions | |
virtual bool | Wait ()=0 |
Wait for ever until the event was set or an error happens. | |
virtual bool | Wait (uint32 millisecs)=0 |
Wait for specified time or until the event was set or an error happens. | |
virtual bool | Try ()=0 |
Try if the event is already set. | |
virtual bool | Set ()=0 |
Set the event. | |
virtual bool | Reset ()=0 |
Reset the event. | |
virtual | ~Event () |
Events are useful when a thread needs to know when to perform its task or a task has finished
Event objects have two types: manual and automatic. A manual Event object stays in the state set by Set or Reset until the other function is called. An automatic Event object automatically returns to a nonsignaled (unavailable) state after at least one thread is released.
To use a Event object, construct the Event object when it is needed. Call Set to signal (make available) the event object. In the other thread reat it out with Wait or TryWait.
Definition at line 72 of file TCMTEvent.h.
virtual TC::MT::Event::~Event | ( | ) | [inline, virtual] |
Definition at line 102 of file TCMTEvent.h.
virtual bool TC::MT::Event::Wait | ( | ) | [pure virtual] |
Wait for ever until the event was set or an error happens.
virtual bool TC::MT::Event::Wait | ( | uint32 | millisecs | ) | [pure virtual] |
Wait for specified time or until the event was set or an error happens.
millisecs | Time in milliseconds to wait |
virtual bool TC::MT::Event::Try | ( | ) | [pure virtual] |
Try if the event is already set.
virtual bool TC::MT::Event::Set | ( | ) | [pure virtual] |
Set the event.
virtual bool TC::MT::Event::Reset | ( | ) | [pure virtual] |
Reset the event.