Concur.Semaphore (concur v0.2.0) View Source
Simple GenServer-based semaphores implementation, with the full semaphore
functions P
(wait
) and V
(signal
).
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Asynchronously increment the value of the semaphore by 1
.
Stops the semaphore process.
Synchronously wait for the semaphore to be available. Decrement the semaphore
by 1
once it is.
Link to this section Types
Specs
limit() :: non_neg_integer()
Specs
t()
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
Specs
signal(t()) :: :ok
Asynchronously increment the value of the semaphore by 1
.
Specs
stop(t()) :: :ok
Stops the semaphore process.
Specs
wait(t()) :: :ok
Synchronously wait for the semaphore to be available. Decrement the semaphore
by 1
once it is.