Method: Bixby::ThreadPool#initialize
- Defined in:
- lib/bixby-common/util/thread_pool.rb
#initialize(options = {}) ⇒ ThreadPool
Returns a new instance of ThreadPool.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bixby-common/util/thread_pool.rb', line 19 def initialize( = {}) @input_queue = Queue.new @lock = Monitor.new @workers = [] @min_size = [:min_size] || DEFAULT_MIN @max_size = [:max_size] || DEFAULT_MAX @idle_timeout = [:idle_timeout] || DEFAULT_IDLE_TIMEOUT @size = 0 (@min_size) end |