method
join
ruby latest stable - Class:
Rake::ThreadPool
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.
join()public
Waits until the queue of futures is empty and all threads have exited.
# File lib/rake/thread_pool.rb, line 44
def join
@threads_mon.synchronize do
begin
stat :joining
@join_cond.wait unless @threads.empty?
stat :joined
rescue Exception => e
stat :joined
$stderr.puts e
$stderr.print "Queue contains #{@queue.size} items. " +
"Thread pool contains #{@threads.count} threads\n"
$stderr.print "Current Thread #{Thread.current} status = " +
"#{Thread.current.status}\n"
$stderr.puts e.backtrace.join("\n")
@threads.each do |t|
$stderr.print "Thread #{t} status = #{t.status}\n"
# 1.8 doesn't support Thread#backtrace
$stderr.puts t.backtrace.join("\n") if t.respond_to? :backtrace
end
raise e
end
end
end Related methods
- Instance methods
- future
- gather_history
- history
- join
- statistics
- Class methods
- new
- Private methods
-
__queue__ -
process_queue_item -
safe_thread_count -
start_thread -
stat