Class: Farce::Unshared::Queue
- Inherits:
-
Abstract::Queue
- Object
- Abstract::Queue
- Farce::Unshared::Queue
- Includes:
- Farce::Unshareable
- Defined in:
- lib/farce/unshared/queue.rb
Overview
A FIFO queue that stores and returns values directly.
Instance Attribute Summary
Attributes inherited from Abstract::Queue
#capacity, #num_waiting, #size
Instance Method Summary collapse
-
#initialize(capacity: 1024, track_age: false) ⇒ Queue
constructor
A new instance of Queue.
-
#mode ⇒ Symbol
The default mode used to transfer values between Ractors.
Methods included from Farce::Unshareable
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.
13 14 15 16 |
# File 'lib/farce/unshared/queue.rb', line 13 def initialize(capacity: 1024, fiber_wait: :auto, track_age: false) @queue = Internal::UnsharedQueue.new(capacity:, fiber_wait:, track_age:) super() end |
Instance Method Details
#mode ⇒ Symbol
The default mode used to transfer values between Ractors.
20 |
# File 'lib/farce/unshared/queue.rb', line 20 def mode = :local |