Class: Evilution::Parallel::Pool Private
- Inherits:
-
Object
- Object
- Evilution::Parallel::Pool
- Defined in:
- lib/evilution/parallel/pool.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(size:, hooks: nil, item_timeout: nil) ⇒ Pool
constructor
private
A new instance of Pool.
- #map(items) ⇒ Object private
- #worker_stats ⇒ Object private
Constructor Details
#initialize(size:, hooks: nil, item_timeout: nil) ⇒ Pool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Pool.
6 7 8 |
# File 'lib/evilution/parallel/pool.rb', line 6 def initialize(size:, hooks: nil, item_timeout: nil) @queue = Evilution::Parallel::WorkQueue.new(size: size, hooks: hooks, item_timeout: item_timeout) end |
Instance Method Details
#map(items) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/evilution/parallel/pool.rb', line 10 def map(items, &) @queue.map(items, &) end |
#worker_stats ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/evilution/parallel/pool.rb', line 14 def worker_stats @queue.worker_stats end |