diff --git a/lib/thread.rb b/lib/thread.rb index 09f2d58..6b47a9f 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -299,7 +299,7 @@ class SizedQueue < Queue @mutex.synchronize{ while true break if @que.length < @max - @queue_wait.push Thread.current + @queue_wait.push Thread.current unless @queue_wait.include?(Thread.current) @mutex.sleep end