Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
thread_counting_semaphore Class Reference

#include <semaphore.h>

Public Member Functions

 thread_counting_semaphore (const int count)
 
 thread_counting_semaphore (const thread_counting_semaphore &)=delete
 
void acquire ()
 
void release ()
 

Protected Attributes

thread_mutex mutex
 
thread_condition_variable condition
 
int count
 

Detailed Description

Definition at line 16 of file semaphore.h.

Constructor & Destructor Documentation

◆ thread_counting_semaphore() [1/2]

thread_counting_semaphore::thread_counting_semaphore ( const int  count)
inlineexplicit

Definition at line 18 of file semaphore.h.

◆ thread_counting_semaphore() [2/2]

thread_counting_semaphore::thread_counting_semaphore ( const thread_counting_semaphore )
delete

Member Function Documentation

◆ acquire()

void thread_counting_semaphore::acquire ( )
inline

Definition at line 24 of file semaphore.h.

References condition, count, lock, and mutex.

◆ release()

void thread_counting_semaphore::release ( void  )
inline

Definition at line 33 of file semaphore.h.

References condition, count, lock, and mutex.

Member Data Documentation

◆ condition

thread_condition_variable thread_counting_semaphore::condition
protected

Definition at line 42 of file semaphore.h.

Referenced by acquire(), and release().

◆ count

int thread_counting_semaphore::count
protected

Definition at line 43 of file semaphore.h.

Referenced by acquire(), and release().

◆ mutex

thread_mutex thread_counting_semaphore::mutex
protected

Definition at line 41 of file semaphore.h.

Referenced by acquire(), and release().


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