lib/rainbows/thread_pool.rb in rainbows-0.9.0 vs lib/rainbows/thread_pool.rb in rainbows-0.90.0
- old
+ new
@@ -65,7 +65,15 @@
rescue => e
Error.listen_loop(e)
end while G.alive
end
+ def join_threads(threads)
+ G.quit!
+ threads.delete_if do |thr|
+ G.tick
+ thr.alive? ? thr.join(0.01) : true
+ end until threads.empty?
+ end
+
end
end