Blender V5.0
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.

References count.

Referenced by thread_counting_semaphore().

◆ 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 22 of file semaphore.h.

References condition, count, lock, and mutex.

◆ release()

void thread_counting_semaphore::release ( )
inline

Definition at line 31 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 40 of file semaphore.h.

Referenced by acquire(), and release().

◆ count

int thread_counting_semaphore::count
protected

Definition at line 41 of file semaphore.h.

Referenced by acquire(), release(), and thread_counting_semaphore().

◆ mutex

thread_mutex thread_counting_semaphore::mutex
protected

Definition at line 39 of file semaphore.h.

Referenced by acquire(), and release().


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