class Concurrent::Semaphore
- Concurrent::Semaphore
- Reference
- Object
Overview
A semaphore allows execution of at most n
tasks simultaneously.
Defined in:
concurrent/semaphore.crConstructors
-
.new(n : Int32)
Create a semaphore for
n
concurrent accesses.
Instance Method Summary
-
#acquire(&)
Acquire an item from the semaphore, calling the block, and then safely releasing the semaphore.
Constructor Detail
Instance Method Detail
def acquire(&)
#
Acquire an item from the semaphore, calling the block, and then safely releasing the semaphore.