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

#include <fbxsync.h>

Class Description

A gate thread locking mechanism is very similar to a semaphore, except that when it is opened, any further call to wait will not wait until it is closed.

It is generally used to block multiple threads until one of them open the gate to release them all.

Definition at line 123 of file fbxsync.h.

Public Member Functions

 FbxGate ()
 Constructor. More...
 
virtual ~FbxGate ()
 Destructor. More...
 
void Open ()
 Open the gate to release all threads waiting. More...
 
void Close ()
 Close the gate so that the next time a thread call Wait() it will be blocked. More...
 
bool IsOpen ()
 Check if the gate is open. More...
 
bool Wait ()
 Wait indefinitely until the gate open. More...
 

Constructor & Destructor Documentation

◆ FbxGate()

FbxGate ( )

Constructor.

◆ ~FbxGate()

virtual ~FbxGate ( )
virtual

Destructor.

Member Function Documentation

◆ Open()

void Open ( )

Open the gate to release all threads waiting.

Remarks
All waiting threads will unblock until the gate is closed.

◆ Close()

void Close ( )

Close the gate so that the next time a thread call Wait() it will be blocked.

◆ IsOpen()

bool IsOpen ( )

Check if the gate is open.

Returns
True if the gate is open, otherwise false.

◆ Wait()

bool Wait ( )

Wait indefinitely until the gate open.

Returns
True if the wait completed without errors.
Remarks
If the gate is already open, this function returns immediately.

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