DUNE: Uniform Navigational Environment  2022.04.1
DUNE::Concurrency::ScopedSemaphore Class Reference

Detailed Description

Scoped Semaphore.

Public Member Functions

 ScopedSemaphore (Semaphore &l)
 
 ~ScopedSemaphore (void)
 

Constructor & Destructor Documentation

◆ ScopedSemaphore()

DUNE::Concurrency::ScopedSemaphore::ScopedSemaphore ( Semaphore l)
inline

Construct the object, locking the associated semaphore.

Parameters
lassociated semaphore.

References DUNE::Concurrency::Semaphore::lock().

Referenced by ~ScopedSemaphore().

◆ ~ScopedSemaphore()

DUNE::Concurrency::ScopedSemaphore::~ScopedSemaphore ( void  )
inline

Destruct the object, unlocking the associated semaphore.

References ScopedSemaphore(), and DUNE::Concurrency::Semaphore::unlock().

Collaboration diagram for DUNE::Concurrency::ScopedSemaphore:
Collaboration graph