Method: HyperThread::Pool#initialize
- Defined in:
- lib/hyper_thread/pool.rb
#initialize(max: 2) ⇒ Pool
Returns a new instance of Pool.
5 6 7 8 9 10 |
# File 'lib/hyper_thread/pool.rb', line 5 def initialize(max: 2) @threads = [] @mutex = Mutex.new @queue = Queue.new @max = max.to_i end |