OGRE-Next 4.0.0unstable
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::CondVariable Class Reference

#include <OgreCondVariable.h>

Public Member Functions

 CondVariable ()
 
 ~CondVariable ()
 
void lock ()
 
void notifyAll ()
 Same as notifyOne, but wakes up all threads.
 
void notifyOne ()
 Wakes up at least one thread being blocked by CondVariable::wait.
 
void unlock ()
 
void wait (CondVariableWaitFunc waitFunc, void *userData)
 Blocks until waitFunc returns false.
 

Detailed Description

Remarks
Author
Matias N. Goldberg

Constructor & Destructor Documentation

◆ CondVariable()

Ogre::CondVariable::CondVariable ( )

◆ ~CondVariable()

Ogre::CondVariable::~CondVariable ( )

Member Function Documentation

◆ lock()

void Ogre::CondVariable::lock ( )

◆ notifyAll()

void Ogre::CondVariable::notifyAll ( )

Same as notifyOne, but wakes up all threads.

◆ notifyOne()

void Ogre::CondVariable::notifyOne ( )

Wakes up at least one thread being blocked by CondVariable::wait.

You can modify the condition and call notifyOne while inside lock/unlock pairs: condVar.lock(); bCondition = true; condVar.notifyOne(); condVar.unlock(); or outside: condVar.lock(); bCondition = true; condVar.unlock(); condVar.notifyOne();

◆ unlock()

void Ogre::CondVariable::unlock ( )

◆ wait()

void Ogre::CondVariable::wait ( CondVariableWaitFunc  waitFunc,
void *  userData 
)

Blocks until waitFunc returns false.

Other threads need to call notifyOne or notifyAll to wake up this thread

You shouldn't call this inside lock() and unlock()

Parameters
waitFunc
userData

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