Jolt Physics
A multi core friendly Game Physics Engine
|
#include <Semaphore.h>
Public Member Functions | |
Semaphore () | |
Constructor. | |
~Semaphore () | |
void | Release (uint inNumber=1) |
Release the semaphore, signaling the thread waiting on the barrier that there may be work. | |
void | Acquire (uint inNumber=1) |
Acquire the semaphore inNumber times. | |
int | GetValue () const |
Get the current value of the semaphore. | |
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.