diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index f20b953..2693710 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -330,7 +330,8 @@ module Rscons end # If needed, do a blocking wait. - if (completed_tcs.empty? and job.nil?) or @threaded_commands.size >= Rscons.n_threads + if (@threaded_commands.size > 0) and + ((completed_tcs.empty? and job.nil?) or (@threaded_commands.size >= Rscons.n_threads)) completed_tcs << wait_for_threaded_commands end