Struct Semaphore
Reactor aware semaphore
Constructors
Name | Description |
this
|
Construct a semaphore with given capacity.
|
Properties
Name | Type | Description |
capacity [get]
|
ulong | Report the capacity of the semaphore
|
level [get]
|
ulong | Report the current amount of available resources.
|
Methods
Name | Description |
acquire
|
acquire resources from the semaphore.
|
close
|
Call this function when the semaphore is no longer needed.
|
open
|
Call this function before using the semaphore.
|
release
|
Release resources acquired via acquire.
|
setCapacity
|
Change the capacity of the semaphore
|
tryAcquire
|
Try to acquire resources from the semaphore.
|