libcoro  1.0
Coroutine support library for C++20

◆ operator co_await()

coro::future<void> coro::semaphore::operator co_await ( )
inline

Returns awaiter, so coroutine can co_await on it.

acquire the semaphore Decrease the counter.

Return values
resolvedfuture is resolved, if counter was above zero
pendingfuture is pending, if counter was (and is) zero. The future can be set to resolved by release()

Definition at line 48 of file semaphore.h.