Open CASCADE Technology  7.4.0
Public Member Functions

Standard_Condition Class Reference

This is boolean flag intended for communication between threads. One thread sets this flag to TRUE to indicate some event happened and another thread either waits this event or checks periodically its state to perform job. More...

#include <Standard_Condition.hxx>

Public Member Functions

 Standard_Condition (bool theIsSet)
 Default constructor. More...
 
 ~Standard_Condition ()
 Destructor. More...
 
void Set ()
 Set event into signaling state. More...
 
void Reset ()
 Reset event (unset signaling state) More...
 
void Wait ()
 Wait for Event (infinity). More...
 
bool Wait (int theTimeMilliseconds)
 Wait for signal requested time. More...
 
bool Check ()
 Do not wait for signal - just test it state. More...
 
bool CheckReset ()
 Method perform two steps at-once - reset the event object and returns true if it was in signaling state. More...
 

Detailed Description

This is boolean flag intended for communication between threads. One thread sets this flag to TRUE to indicate some event happened and another thread either waits this event or checks periodically its state to perform job.

This class provides interface similar to WinAPI Event objects.

Constructor & Destructor Documentation

◆ Standard_Condition()

Standard_Condition::Standard_Condition ( bool  theIsSet)

Default constructor.

Parameters
theIsSetInitial flag state

◆ ~Standard_Condition()

Standard_Condition::~Standard_Condition ( )

Destructor.

Member Function Documentation

◆ Check()

bool Standard_Condition::Check ( )

Do not wait for signal - just test it state.

Returns
true if get event

◆ CheckReset()

bool Standard_Condition::CheckReset ( )

Method perform two steps at-once - reset the event object and returns true if it was in signaling state.

Returns
true if event object was in signaling state.

◆ Reset()

void Standard_Condition::Reset ( )

Reset event (unset signaling state)

◆ Set()

void Standard_Condition::Set ( )

Set event into signaling state.

◆ Wait() [1/2]

void Standard_Condition::Wait ( )

Wait for Event (infinity).

◆ Wait() [2/2]

bool Standard_Condition::Wait ( int  theTimeMilliseconds)

Wait for signal requested time.

Parameters
theTimeMillisecondswait limit in milliseconds
Returns
true if get event

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