Class: Concurrent::Semaphore
- Inherits:
-
MutexSemaphore
- Object
- MutexSemaphore
- Concurrent::Semaphore
- Defined in:
- lib/concurrent/atomic/semaphore.rb,
lib/concurrent/atomic/semaphore.rb
Overview
A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each MutexSemaphore#acquire blocks if necessary until a permit is available, and then takes it. Each MutexSemaphore#release adds a permit, potentially releasing a blocking acquirer. However, no actual permit objects are used; the Semaphore just keeps a count of the number available and acts accordingly.
Method Summary
Methods inherited from MutexSemaphore
#acquire, #available_permits, #drain_permits, #initialize, #reduce_permits, #release, #try_acquire
Constructor Details
This class inherits a constructor from Concurrent::MutexSemaphore