Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Semaphore Class Reference

#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...
 

Detailed Description

Implements a semaphore When we switch to C++20 we can use counting_semaphore to unify this

Constructor & Destructor Documentation

◆ Semaphore()

JPH_NAMESPACE_BEGIN Semaphore::Semaphore ( )

Constructor.

◆ ~Semaphore()

Semaphore::~Semaphore ( )

Member Function Documentation

◆ Acquire()

void Semaphore::Acquire ( uint  inNumber = 1)

Acquire the semaphore inNumber times.

◆ GetValue()

int Semaphore::GetValue ( ) const
inline

Get the current value of the semaphore.

◆ Release()

void Semaphore::Release ( uint  inNumber = 1)

Release the semaphore, signaling the thread waiting on the barrier that there may be work.


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