Named Semaphore.
More...
#include <Semaphore.h>
|
| ~Semaphore () |
|
bool | lock () const |
| Block and wait until resource is acquired.
|
|
bool | unlock () const |
| Release the current resource.
|
|
bool | tryLock (std::chrono::milliseconds ms) const |
|
|
static Ptr | create (std::string name, uint32_t initial_count=1) |
|
◆ Ptr
◆ ~Semaphore()
Semaphore::~Semaphore |
( |
| ) |
|
◆ Semaphore()
Semaphore::Semaphore |
( |
std::unique_ptr< Impl > | impl | ) |
|
|
explicitprivate |
◆ create()
Semaphore::Ptr Semaphore::create |
( |
std::string | name, |
|
|
uint32_t | initial_count = 1 ) |
|
static |
◆ lock()
bool Semaphore::lock |
( |
| ) |
const |
Block and wait until resource is acquired.
References impl.
◆ tryLock()
bool Semaphore::tryLock |
( |
std::chrono::milliseconds | ms | ) |
const |
Try to acquire resource within a certain time
- Parameters
-
ms | Waiting time in milliseconds, invalid on APPLE platforms |
- Returns
- Whether acquisition is successful
References impl.
◆ unlock()
bool Semaphore::unlock |
( |
| ) |
const |
Release the current resource.
References impl.
◆ impl
std::unique_ptr<Impl> sese::system::Semaphore::impl |
|
private |
The documentation for this class was generated from the following files: