The standard semaphore concept, with an async API.
Create a simple counting semaphore, create initial_value
is the inital value of the
semaphore. Callers to decr
will wait until the value is positive.
Increment the semaphore and if there are jobs sleeping on decr
wakeup one of them.
Decrement the sempahore. This blocks if resulting the semaphore value is negative.