|
roo_threads
API Documentation for roo_threads
|
#include <semaphore_api.h>
Public Member Functions | |
| counting_semaphore (std::ptrdiff_t desired) noexcept | |
| Constructs semaphore with initial token count. | |
| counting_semaphore (const counting_semaphore &)=delete | |
| counting_semaphore & | operator= (const counting_semaphore &)=delete |
| void | acquire () noexcept |
| Acquires a token, blocking until one is available. | |
| bool | try_acquire () noexcept |
| Attempts to acquire a token without blocking. | |
| bool | try_acquire_for (const roo_time::Duration &duration) noexcept |
| Attempts to acquire a token for a bounded duration. | |
| bool | try_acquire_until (const roo_time::Uptime &when) noexcept |
| Attempts to acquire a token until the given deadline. | |
| void | release () noexcept |
| Releases one token. | |
Definition at line 12 of file semaphore_api.h.
|
explicitnoexcept |
Constructs semaphore with initial token count.
| desired | initial token count. |
|
delete |
|
noexcept |
Acquires a token, blocking until one is available.
|
delete |
|
noexcept |
Releases one token.
|
noexcept |
Attempts to acquire a token without blocking.
|
noexcept |
Attempts to acquire a token for a bounded duration.
| duration | relative timeout duration. |
|
noexcept |
Attempts to acquire a token until the given deadline.
| when | absolute timeout point. |