Method: XThread::RBSizedQueue#max=
- Defined in:
- lib/xthread.rb
#max=(max) ⇒ Object
Sets the maximum size of the queue.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/xthread.rb', line 175 def max=(max) diff = nil @mutex.synchronize { if max <= @max @max = max else diff = max - @max @max = max end } if diff diff.times do @cond_wait.signal end end max end |