Method: ZK::Threadpool#initialize
- Defined in:
- lib/zk/threadpool.rb
#initialize(size = nil) ⇒ Threadpool
Returns a new instance of Threadpool.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/zk/threadpool.rb', line 18 def initialize(size=nil) @size = size || self.class.default_size @threadpool = [] @state = :new @queue = [] @mutex = Mutex.new @cond = ConditionVariable.new @error_callbacks = [] start! end |