diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 02586ad5e..d4e2680f6 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -124,7 +124,7 @@ def run_with_threads yield - thread_pool.join + thread_pool.join if defined?(@thread_pool) if options.job_stats stats = thread_pool.statistics puts "Maximum active threads: #{stats[:max_active_threads]} + main"