Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::mt::SemaphoreFast Class Referencefinal

An optimized version of Semaphore that avoids expensive system calls when the counter is greater than 0. More...

#include <semaphore_fast.h>

Public Member Functions

 SemaphoreFast (int32_t count=0)
 
void release (int32_t count=1)
 Increments semaphore count by the specified amount.
 
bool wait ()
 Decrements semaphore count by 1. If the count is already 0, it waits indefinitely until semaphore count is incremented, then decrements and returns. Returns false when an error occurs, otherwise returns true.
 

Detailed Description

An optimized version of Semaphore that avoids expensive system calls when the counter is greater than 0.


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