vendor/bundle/ruby/1.8/gems/work_queue-1.0.0/lib/work_queue.rb
##
# Waits until the tasks queue is empty and all worker threads have finished.
#
#  wq = WorkQueue.new(1)
#  wq.enqueue_b { sleep(1) }
#  wq.join
#
Waits until the tasks queue is empty and all worker threads have finished.
Waits until the tasks queue is empty and all worker threads have finished .
def join
    cur_threads.times { dismiss_thread }
    @threads.dup.each { |thread| thread.join }
    self
  end
def join cur_threads . times { dismiss_thread } @threads . dup . each { | thread | thread . join } self end
Waits until the tasks queue is empty and all worker threads have finished.
Waits until the tasks queue is empty and all worker threads have finished .