Class: Evilution::Parallel::Pool Private

Inherits:
Object
  • Object
show all
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

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_statsObject

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