OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::Barrier Class Reference

A barrier is a synchronization mechanism where multiple threads wait until all of them have reached the barrier sync point before continuing. More...

#include <OgreBarrier.h>

Public Member Functions

 Barrier (size_t threadCount)
 
 ~Barrier ()
 
void sync ()
 When calling this function, it will block until all N threads reach this point; where N is the thread count passed to the Barrier's constructor. More...
 

Detailed Description

A barrier is a synchronization mechanism where multiple threads wait until all of them have reached the barrier sync point before continuing.

A fixed number of threads must be provided on initialization.

Remarks
On Windows, Synchronization Barriers weren't introduced until Windows 8 (!?!?!? No comments...) Therefore, we emulate them using two Semaphores and (for performance reasons)
Author
Matias N. Goldberg

Constructor & Destructor Documentation

◆ Barrier()

Ogre::Barrier::Barrier ( size_t  threadCount)

◆ ~Barrier()

Ogre::Barrier::~Barrier ( )

Member Function Documentation

◆ sync()

void Ogre::Barrier::sync ( )

When calling this function, it will block until all N threads reach this point; where N is the thread count passed to the Barrier's constructor.


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