libcoro
1.0
Coroutine support library for C++20
|
Implements semaphore for coroutines. More...
#include <semaphore.h>
Public Member Functions | |
semaphore ()=default | |
construct semaphore with counter set to zero More... | |
coro::future< void > | acquire () |
acquire the semaphore More... | |
coro::future< void > | operator co_await () |
Returns awaiter, so coroutine can co_await on it. More... | |
coro::promise< void >::notify | release () |
Release the semaphore. More... | |
long | get () |
Retrieve counter. More... | |
bool | try_acquire () |
Try acquire the semaphore. More... | |
Implements semaphore for coroutines.
Definition at line 14 of file semaphore.h.