about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb
index 95d6545..9da148c 100644
--- a/lib/rainbows/base.rb
+++ b/lib/rainbows/base.rb
@@ -93,7 +93,7 @@ module Rainbows
       Rainbows::G.alive = false
       expire = Time.now + (timeout * 2.0)
       m = 0
-      while (nr = threads.count { |thr| thr.alive? }) > 0
+      until (threads.delete_if { |thr| ! thr.alive? }).empty?
         threads.each { |thr|
           worker.tmp.chmod(m = 0 == m ? 1 : 0)
           thr.join(1)