Class: Redrate::Queue
- Inherits:
-
Object
- Object
- Redrate::Queue
- Defined in:
- lib/redrate/queue.rb
Constant Summary collapse
- EPOCH =
0
Instance Method Summary collapse
-
#initialize(size, interval: 60, key: 'queue') ⇒ Queue
constructor
A new instance of Queue.
- #shift ⇒ Object
Constructor Details
Instance Method Details
#shift ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/redrate/queue.rb', line 14 def shift time = nil @ring.lock do sleep_until(@ring.current + @interval) @ring.rotate! end time end |