Class: Evilution::Parallel::WorkQueue::Dispatcher
- Inherits:
-
Object
- Object
- Evilution::Parallel::WorkQueue::Dispatcher
- Defined in:
- lib/evilution/parallel/work_queue/dispatcher.rb
Defined Under Namespace
Classes: RunResult
Instance Attribute Summary collapse
-
#first_error ⇒ Object
readonly
Returns the value of attribute first_error.
Instance Method Summary collapse
-
#initialize(workers:, items:, prefetch:, item_timeout:, worker_max_items:, recycle_factory:) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
- #run ⇒ Object
Constructor Details
#initialize(workers:, items:, prefetch:, item_timeout:, worker_max_items:, recycle_factory:) ⇒ Dispatcher
Returns a new instance of Dispatcher.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/evilution/parallel/work_queue/dispatcher.rb', line 11 def initialize(workers:, items:, prefetch:, item_timeout:, worker_max_items:, recycle_factory:) @workers = workers @items = items @prefetch = prefetch @item_timeout = item_timeout @worker_max_items = worker_max_items @recycle_factory = recycle_factory @state = Evilution::Parallel::WorkQueue.send(:const_get, :CollectionState).new(items.length) @retired = [] end |
Instance Attribute Details
#first_error ⇒ Object (readonly)
Returns the value of attribute first_error.
9 10 11 |
# File 'lib/evilution/parallel/work_queue/dispatcher.rb', line 9 def first_error @first_error end |