Method: ThreadPool#initialize

Defined in:
lib/tpkg/thread_pool.rb

#initialize(max_size = 10) ⇒ ThreadPool

Returns a new instance of ThreadPool.



80
81
82
83
84
# File 'lib/tpkg/thread_pool.rb', line 80

def initialize(max_size = 10)
  @max_size = max_size
  @queue = Queue.new
  @workers = []
end