FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxSemaphore Class Reference

#include <fbxsync.h>

Class Description

Mutually excluding thread waiting mechanism with a counter.

Semaphore are generally used in situations when the current thread needs to wait for other threads before proceeding to the next step. In other words, that thread waits a number of signals from other threads. This is the best mechanism to use to synchronize threads since it doesn't require an heavy critical section.

Definition at line 96 of file fbxsync.h.

Public Member Functions

 FbxSemaphore ()
 Constructor. More...
 
virtual ~FbxSemaphore ()
 Destructor. More...
 
bool Wait (unsigned int pCount=1)
 Wait indefinitely until the semaphore as been signaled as many times as specified. More...
 
bool Signal (unsigned int pCount=1)
 Signal the semaphore as many times as specified. More...
 

Constructor & Destructor Documentation

◆ FbxSemaphore()

Constructor.

◆ ~FbxSemaphore()

virtual ~FbxSemaphore ( )
virtual

Destructor.

Member Function Documentation

◆ Wait()

bool Wait ( unsigned int  pCount = 1)

Wait indefinitely until the semaphore as been signaled as many times as specified.

Parameters
pCountNumber of signal to wait before this function returns.
Returns
True if the wait exit without errors.
Remarks
If pCount is set to zero, this function returns immediately without waiting.

◆ Signal()

bool Signal ( unsigned int  pCount = 1)

Signal the semaphore as many times as specified.

Parameters
pCountThe number of signal to send to the semaphore.
Returns
True if the semaphore was signaled without errors.

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