Method: Airflow::Executors::ThreadPoolExecutor#initialize

Defined in:
lib/async_flow/executors.rb

#initialize(size) ⇒ ThreadPoolExecutor

Returns a new instance of ThreadPoolExecutor.



11
12
13
14
15
16
17
18
# File 'lib/async_flow/executors.rb', line 11

def initialize(size)
  @jobs = Queue.new
  @pool = Array.new(size) do
    Thread.new do
      poll
    end
  end
end