diff options
Diffstat (limited to 'test/ruby/test_thread_queue.rb')
| -rw-r--r-- | test/ruby/test_thread_queue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_thread_queue.rb b/test/ruby/test_thread_queue.rb index b5ee70d9dc..e96107cea7 100644 --- a/test/ruby/test_thread_queue.rb +++ b/test/ruby/test_thread_queue.rb @@ -361,7 +361,7 @@ class TestThreadQueue < Test::Unit::TestCase items = [] # sometimes empty? is false but pop will raise ThreadError('empty'), # meaning a value is not immediately available but will be soon. - until q.empty? and !prod_threads.any?(&:alive?) + while prod_threads.any?(&:alive?) or !q.empty? items << q.pop(true) rescue nil end assert_join_threads(prod_threads) |
