OpenSceneGraph
Public Member Functions | Protected Attributes | List of all members
OpenThreads::Block Class Reference

Block is a block that can be used to halt a thread that is waiting another thread to release it. More...

Inheritance diagram for OpenThreads::Block:
Inheritance graph
[legend]

Public Member Functions

 Block ()
 
 ~Block ()
 
bool block ()
 
bool block (unsigned long timeout)
 
void release ()
 
void reset ()
 
void set (bool doRelease)
 

Protected Attributes

Mutex _mut
 
Condition _cond
 
bool _released
 

Detailed Description

Block is a block that can be used to halt a thread that is waiting another thread to release it.

Constructor & Destructor Documentation

◆ Block()

OpenThreads::Block::Block ( )
inline

◆ ~Block()

OpenThreads::Block::~Block ( )
inline

References release().

Member Function Documentation

◆ block() [1/2]

bool OpenThreads::Block::block ( )
inline

◆ block() [2/2]

bool OpenThreads::Block::block ( unsigned long  timeout)
inline

◆ release()

void OpenThreads::Block::release ( )
inline

◆ reset()

void OpenThreads::Block::reset ( )
inline

References _mut, and _released.

Referenced by set().

◆ set()

void OpenThreads::Block::set ( bool  doRelease)
inline

References _released, release(), and reset().

Member Data Documentation

◆ _cond

Condition OpenThreads::Block::_cond
protected

◆ _mut

Mutex OpenThreads::Block::_mut
protected

◆ _released

bool OpenThreads::Block::_released
protected

Referenced by block(), release(), reset(), and set().


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