Proud::Event Class Reference

Public Member Functions

PROUD_API Event (bool manualReset, bool initialState)
 
PROUD_API Event ()
 
PROUD_API ~Event ()
 
void Set ()
 
void Reset ()
 
PROUD_API bool WaitOne (uint32_t timeOut)
 
PROUD_API bool WaitOne ()
 
void SuspendShrink ()
 
void OnRecycle ()
 
void OnDrop ()
 

Static Public Member Functions

static int WaitAny (Event **events, int count)
 
static int WaitAny (Event **events, int count, uint32_t timeOut)
 
static int WaitAll (Event **events, int count)
 
static int WaitAll (Event **events, int count, uint32_t timeOut)
 

Public Attributes

HANDLE m_event
 

Detailed Description

Event object in multi-thread programming

Constructor & Destructor Documentation

PROUD_API Proud::Event::Event ( bool  manualReset,
bool  initialState 
)

Constructor

Parameters
manualResetWaiting will end when signal occurs while there exists thread waiting for this object's signal through ::WaitForSingleObject or WaitAny or WaitAll. Enter true to make event object be non-signal state (event reset) automatically.
initialStateTrue in order to create this event object as to make it received signal initially.
PROUD_API Proud::Event::Event ( )

Creates with default option

  • Begins as auto reset and non signaled
PROUD_API Proud::Event::~Event ( )

Destructor

Member Function Documentation

void Proud::Event::Reset ( )
inline

Revmoes signal

void Proud::Event::Set ( )
inline

Enters signal into event

static int Proud::Event::WaitAll ( Event **  events,
int  count 
)
inlinestatic

Waits until all of event objects entered occur

static int Proud::Event::WaitAll ( Event **  events,
int  count,
uint32_t  timeOut 
)
static

Waits until all of event objects entered occur

static int Proud::Event::WaitAny ( Event **  events,
int  count 
)
inlinestatic

Waits until at least one of event objects entered occurs

Returns
-1 or allocation clause of event object that has been successfully completed
static int Proud::Event::WaitAny ( Event **  events,
int  count,
uint32_t  timeOut 
)
static

Waits until at least one of event objects entered occurs

Returns
-1 or allocation clause of event object that has been successfully completed
PROUD_API bool Proud::Event::WaitOne ( uint32_t  timeOut)

Waits until signal arrives

Parameters
timeOut(in milliseconds) signal waiting max time. It waits permanantly when infinite entered.
PROUD_API bool Proud::Event::WaitOne ( )

Waits indefinitely until signal arrives