Class: Farce::Strict::Queue
- Inherits:
-
Abstract::Queue
- Object
- Abstract::Queue
- Farce::Strict::Queue
- Includes:
- Farce::Shareable::Unfreezable
- Defined in:
- lib/farce/strict/queue.rb
Overview
A FIFO queue that stores and returns values directly.
Instance Attribute Summary
Attributes inherited from Abstract::Queue
#capacity, #mode, #num_waiting, #size
Instance Method Summary collapse
-
#initialize(capacity: 1024, track_age: false) ⇒ Queue
constructor
A new instance of Queue.
Methods included from Farce::Shareable
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: 1024, track_age: false) ⇒ Queue
Returns a new instance of Queue.
11 12 13 14 |
# File 'lib/farce/strict/queue.rb', line 11 def initialize(capacity: 1024, track_age: false) @queue = Internal::Queue.new(capacity:, track_age:) super() end |