class Condition

Condition. More...

Full nameCoral::Condition
Definition#include <condition.h>
InheritsCoral::Synchronizable [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This class realizes a condition variable.

See also: Synchronizable, Thread

 Condition (const char* name = "Condition", Condition* parentCondition = NULL)

Condition

Constructor.

Parameters:
nameName.
parentConditionParent condition.

 ~Condition ()

~Condition

Destructor.

inline void  signal ()

signal

Fire condition: One thread waiting for this variable will be resumed.

inline void  broadcast ()

broadcast

Broadcast condition: All threads waiting for this variable will be resumed.

inline bool  fired ()

fired

Check, if condition has been fired.

Returns: true, if condition has been fired; false otherwise.

inline void  wait ()

wait

Wait for condition without timeout.

bool  timedWait (const card64 microseconds)

timedWait

Wait for condition with timeout.

Parameters:
microsecondsTimeout in microseconds.

Returns: true, if condition has been received; false for timeout.

void  addParent (Condition* parentCondition)

addParent

Add parent condition.

Parameters:
parentConditionParent condition to be added.

void  removeParent (Condition* parentCondition)

removeParent

Remove parent condition.

Parameters:
parentConditionParent condition to be removed.