MeVisLab Toolbox Reference
asio::Semaphore Class Referencefinal

A simple semaphore with increment and decrement functionality. More...

#include <Semaphore.h>

Public Member Functions

 Semaphore ()
 Semaphore (const Semaphore &)=default
Semaphoreoperator= (const Semaphore &)=default
 ~Semaphore ()
void increment ()
void decrement ()

Detailed Description

A simple semaphore with increment and decrement functionality.

Its destruction will wait until the usage count is zero.

Synopsis:

// This will produce a deadlock
{
asio::Semaphore semaphore;
semaphore.increment();
} // The semaphore object's destructor waits until usage is zero again (decrement() call),
// but it won't happen in this scenario.
{
asio::Semaphore semaphore;
semaphore.increment();
semaphore.decrement();
} // Now the semaphore has usage count zero, it will be destroyed.
A simple semaphore with increment and decrement functionality.
Definition Semaphore.h:40

Definition at line 39 of file Semaphore.h.

Constructor & Destructor Documentation

◆ Semaphore() [1/2]

asio::Semaphore::Semaphore ( )

Referenced by operator=(), and Semaphore().

◆ Semaphore() [2/2]

asio::Semaphore::Semaphore ( const Semaphore & )
default

References Semaphore().

◆ ~Semaphore()

asio::Semaphore::~Semaphore ( )

Member Function Documentation

◆ decrement()

void asio::Semaphore::decrement ( )

◆ increment()

void asio::Semaphore::increment ( )

◆ operator=()

Semaphore & asio::Semaphore::operator= ( const Semaphore & )
default

References Semaphore().


The documentation for this class was generated from the following file:
  • FMEstable/ReleaseMeVis/Projects/AsynchronousIO/Sources/asio/Semaphore.h