aether::semaphore_guard Class Reference

The class semaphore_guard is a posix semaphore wrapper that provides a RAII-style mechanism for owning a semaphore for the duration of a scoped block. More...

#include <blob_store.hh>

Public Member Functions

 semaphore_guard (const std::string &name)
 
 ~semaphore_guard ()
 
 semaphore_guard (const semaphore_guard &)=delete
 
semaphore_guard operator= (const semaphore_guard &)=delete
 

Detailed Description

The class semaphore_guard is a posix semaphore wrapper that provides a RAII-style mechanism for owning a semaphore for the duration of a scoped block.

When a semaphore_guard object is created, it attempts to take ownership of the semaphore. When control leaves the scope, semaphore_guard is destructed and the semaphore is increased.

Constructor & Destructor Documentation

aether::semaphore_guard::semaphore_guard ( const std::string &  name)
aether::semaphore_guard::~semaphore_guard ( )
aether::semaphore_guard::semaphore_guard ( const semaphore_guard )
delete

Member Function Documentation

semaphore_guard aether::semaphore_guard::operator= ( const semaphore_guard )
delete