Jolt Physics
A multi core friendly Game Physics Engine
|
#include <Semaphore.h>
Public Member Functions | |
Semaphore () | |
Constructor. More... | |
~Semaphore () | |
void | Release (uint inNumber=1) |
Release the semaphore, signaling the thread waiting on the barrier that there may be work. More... | |
void | Acquire (uint inNumber=1) |
Acquire the semaphore inNumber times. More... | |
int | GetValue () const |
Get the current value of the semaphore. More... | |
Implements a semaphore When we switch to C++20 we can use counting_semaphore to unify this
JPH_NAMESPACE_BEGIN Semaphore::Semaphore | ( | ) |
Constructor.
Semaphore::~Semaphore | ( | ) |
void Semaphore::Acquire | ( | uint | inNumber = 1 | ) |
Acquire the semaphore inNumber times.
|
inline |
Get the current value of the semaphore.
void Semaphore::Release | ( | uint | inNumber = 1 | ) |
Release the semaphore, signaling the thread waiting on the barrier that there may be work.