Method: XThread::RBSizedQueue#initialize
- Defined in:
- lib/xthread.rb
#initialize(max) ⇒ RBSizedQueue
Creates a fixed-length queue with a maximum size of max.
158 159 160 161 162 163 |
# File 'lib/xthread.rb', line 158 def initialize(max) raise ArgumentError, "queue size must be positive" unless max > 0 @max = max @cond_wait = ConditionVariable.new super() end |