class asyncio.Semaphore(value=1, *, loop=None)
A Semaphore implementation.
A semaphore manages an internal counter which is decremented by each acquire() call and incremented by each release() call. The counter can never go below zero; when acquire() finds that it is zero, it blocks, waiting until some other coroutine calls release().
Semaphores also support the context management protocol.
The optional argument gives the initial value for the internal counter; it defaults to 1. If the value