class SizedQueue
Public Instance Methods
clear()
click to toggle source
Removes all objects from the queue and wakes waiting threads, if any.
# File lib/rwlock/sized_queue_patch.rb, line 5 def clear @mutex.synchronize do @que.clear begin until @queue_wait.empty? @queue_wait.shift.wakeup end rescue ThreadError retry end end end