Class Hierarchy   Class Index   Method Index  

CHMmanualResetEvent Class Reference

#include <CHMmanualResetEvent.h>


Detailed Description

A portable manual-reset event object, useful for thread synchronization.

The event has two states: signalled, and non-signalled, controlled via the signal() and reset() methods. When in the signalled state, calls to wait() will return immediately. When in the non-signalled state, calls to wait() will block until such time as the event enters the signalled state (unless a wait timeout is provided and elapses).


Public Member Functions

 CHMmanualResetEvent ()
 Default constructor.
 ~CHMmanualResetEvent ()
 Destructor.
void reset ()
 Set the event to the non-signalled state.
void signal ()
 Set the event to the signalled state.
void wait ()
 Wait for the event to enter the signalled state.
CHMboolean wait (CHMuint32 TimeoutInMilliseconds)
 Wait for the event to enter the signalled state, or for the given timeout period to elapse.


Constructor & Destructor Documentation

CHMmanualResetEvent::CHMmanualResetEvent  ) 
 

Default constructor.

Starts in the non-signalled state.

CHMmanualResetEvent::~CHMmanualResetEvent  ) 
 

Destructor.

Non-virtual: do not inherit from this class.


Member Function Documentation

void CHMmanualResetEvent::reset  ) 
 

Set the event to the non-signalled state.

void CHMmanualResetEvent::signal  ) 
 

Set the event to the signalled state.

CHMboolean CHMmanualResetEvent::wait CHMuint32  TimeoutInMilliseconds  ) 
 

Wait for the event to enter the signalled state, or for the given timeout period to elapse.

Returns true if the event entered the signalled state, and false if the timeout period elapsed.

void CHMmanualResetEvent::wait  ) 
 

Wait for the event to enter the signalled state.


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