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