A counting semaphore for coroutines that logically maintains a number of available permits. Each acquire takes a single permit or suspends until it is available. Each release adds a permit, potentially releasing a suspended acquirer. Semaphore is fair and maintains a FIFO order of acquirers.
Semaphores are mostly used to limit the number of coroutines that have an access to particular resource. Semaphore with permits = 1 is essentially a Mutex.