OpenThreads::Barrier Class Reference

This class provides an object-oriented thread barrier interface. More...

`#include <Barrier>`

Inheritance diagram for OpenThreads::Barrier:

## Public Member Functions

| Barrier (int numThreads=0)
virtual | ~Barrier ()
virtual void | reset ()
virtual void | block (unsigned int numThreads=0)
virtual void | release ()
virtual int | numThreadsCurrentlyBlocked ()
void | invalidate ()

## Detailed Description

This class provides an object-oriented thread barrier interface.

Warning
  It is unwise to use the construct "Barrier barrier" in the global namespace on sgi's. The object "barrier" will confilict with the c-library sproc function "barrier" and unpredictable results may occur. You have been warned.

## Constructor & Destructor Documentation

## Barrier()

OpenThreads::Barrier::Barrier | ( | int | numThreads = 0 | ) |

Constructor

Referenced by osg::BarrierOperation::BarrierOperation(), and invalidate().

## ~Barrier()

virtual OpenThreads::Barrier::~Barrier | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## block()

virtual void OpenThreads::Barrier::block | ( | unsigned int | numThreads = 0 | ) |

virtual

Block until numThreads threads have entered the barrier.

## invalidate()

void OpenThreads::Barrier::invalidate | ( |  | ) |

References Barrier().

## numThreadsCurrentlyBlocked()

virtual int OpenThreads::Barrier::numThreadsCurrentlyBlocked | ( |  | ) |

virtual

Return the number of threads currently blocked in the barrier, Return -1 if error.

## release()

virtual void OpenThreads::Barrier::release | ( |  | ) |

virtual

Release the barrier, now.

Reimplemented in osg::BarrierOperation.

## reset()

virtual void OpenThreads::Barrier::reset | ( |  | ) |

virtual

Reset the barrier to it's original state.

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

- Barrier