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 |
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.
aether::semaphore_guard::semaphore_guard | ( | const std::string & | name | ) |
aether::semaphore_guard::~semaphore_guard | ( | ) |
|
delete |
|
delete |