Constructor
new Semaphore(valueopt)
- Source:
- See:
-
- Python's asyncio.Semaphore
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
Number |
<optional> |
1
|
The number of simultaneous acquisitions this semaphore will permit before blocking. |
Classes
Methods
(async) acquire() → {Future.<boolean>}
Attempt to acquire one of the available slots in this semaphore.
If none are available, wait in line until one is available.
Returns:
true
- Type
- Future.<boolean>
locked() → {boolean}
Has the semaphore exhausted all acquisitions.
Returns:
true
if it will block an acquire
- Type
- boolean
release()
Release a slot previously acquired with
acquire