libcoro  1.0
Coroutine support library for C++20

◆ get()

long coro::semaphore::get ( )
inline

Retrieve counter.

Return values
>0semaphore is opened
=0semaphore is closed, acquire will block
<0semaphore is closed, and there are awaiting coroutine, the absolute value of the return value contains count of awaiting coroutine

Definition at line 79 of file semaphore.h.