Class: Farce::Local::TimerQueue
- Inherits:
-
Abstract::TimerQueue
- Object
- Abstract::Queue
- Abstract::TimerQueue
- Farce::Local::TimerQueue
- Includes:
- Scoped, Shareable::Unfreezable
- Defined in:
- lib/farce/local/timer_queue.rb
Overview
A shareable timer queue with independent mutable storage in each scope.
Instance Attribute Summary
Attributes included from Scoped
Attributes inherited from Abstract::Queue
#capacity, #num_waiting, #size
Instance Method Summary collapse
-
#initialize(capacity: nil, track_age: false, scope: :ractor) ⇒ TimerQueue
constructor
Valid scopes are: *
:ractor- The value is shared by all threads within the same Ractor. -
#mode ⇒ Symbol
Always returns
:local.
Methods included from Shareable
Methods inherited from Abstract::TimerQueue
#delete, #first_timestamp, #last_timestamp, #overdue?, #overdue_by, #peek, #pop, #push, #try_pop, #try_push, #wait_pop
Methods inherited from Abstract::Queue
#age_tracking?, #clear, #close, #closed?, #deq, #duplicable?, #empty?, #enq, #full?, #generation, #length, #max, #oldest_age, #oldest_enqueued_at, #pop, #push, #seal, #sealed?, #try_pop, #try_push, #wait_pop, #wait_push
Constructor Details
#initialize(capacity: nil, track_age: false, scope: :ractor) ⇒ TimerQueue
Returns a new instance of TimerQueue.
19 20 21 |
# File 'lib/farce/local/timer_queue.rb', line 19 def initialize(capacity: nil, track_age: false, scope: :ractor, fiber_wait: :auto) super end |
Instance Method Details
#mode ⇒ Symbol
Returns always returns :local.
24 |
# File 'lib/farce/local/timer_queue.rb', line 24 def mode = :local |