ARC SDK
Public Member Functions
Arc::SimpleCondition Class Reference

Simple triggered condition. More...

#include <arc/Thread.h>

Public Member Functions

void lock (void)
 Acquire semaphor.
 
void unlock (void)
 Release semaphor.
 
void signal (void)
 
void signal_nonblock (void)
 Signal about condition without using semaphor. More...
 
void broadcast (void)
 Signal about condition to all waiting threads. More...
 
void wait (void)
 Wait for condition.
 
void wait_nonblock (void)
 Wait for condition without using semaphor. More...
 
bool wait (int t)
 Wait for condition no longer than t milliseconds. More...
 
void reset (void)
 Reset object to initial state.
 
void forceReset (void)
 This method is meant to be used only after fork. More...
 

Detailed Description

Simple triggered condition.

Provides condition and semaphor objects in one element.

Member Function Documentation

void Arc::SimpleCondition::broadcast ( void  )
inline

Signal about condition to all waiting threads.

If there are no waiting threads, it works like signal().

void Arc::SimpleCondition::forceReset ( void  )
inline

This method is meant to be used only after fork.

It resets state of all internal locks and variables.

void Arc::SimpleCondition::signal ( void  )
inline

Signal about condition. This overrides broadcast().

void Arc::SimpleCondition::signal_nonblock ( void  )
inline

Signal about condition without using semaphor.

Call it only with lock acquired.

bool Arc::SimpleCondition::wait ( int  t)
inline

Wait for condition no longer than t milliseconds.

Returns
false if timeout occurred
void Arc::SimpleCondition::wait_nonblock ( void  )
inline

Wait for condition without using semaphor.

Call it only with lock acquired.


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