Coin Logo http://www.sim.no
http://www.coin3d.org

SbCondVar Class Reference
[Portable thread-handling abstractions]

A class for synchronizing access to global variables.

Condition variables are used to protect global variables in an environment where multiple threads are running concurrently. More...

#include <Inventor/threads/SbCondVar.h>

List of all members.

Public Member Functions

 SbCondVar (void)
 ~SbCondVar (void)
SbBool wait (SbMutex &mutex)
SbBool timedWait (SbMutex &mutex, SbTime period)
void wakeOne (void)
void wakeAll (void)


Detailed Description

A class for synchronizing access to global variables.

Condition variables are used to protect global variables in an environment where multiple threads are running concurrently.


Constructor & Destructor Documentation

SbCondVar::SbCondVar ( void   )  [inline]

Constructor.

SbCondVar::~SbCondVar ( void   )  [inline]

Destructor.


Member Function Documentation

SbBool SbCondVar::wait ( SbMutex mutex  )  [inline]

This method blocks the calling thread until another thread calls wakeOne() or wakeAll() on the SbCondVar object.

References SbMutex::mutex.

SbBool SbCondVar::timedWait ( SbMutex mutex,
SbTime  period 
) [inline]

This method blocks the calling thread until another thread calls wakeOne() or wakeAll() on the object, but if this does not happen within period, the thread is woken again anyways.

TRUE is returned when the thread wakes because either wakeOne() or wakeAll() was called, FALSE is returned if the wait times out.

References SbTime::getValue(), and SbMutex::mutex.

void SbCondVar::wakeOne ( void   )  [inline]

This method wakes up one of the threads waiting on this SbCondVar.

void SbCondVar::wakeAll ( void   )  [inline]

This method wakes up all the threads waiting on this SbCondVar.


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 23 16:33:40 2009 for Coin by Doxygen. 1.5.8