Fix non-blocking thread-wait if Rscons.n_threads is set to 0 - close #37

This commit is contained in:
Josh Holtrop 2017-06-13 19:07:04 -04:00
parent 4ad6ce1d9c
commit eca01c38df

View File

@ -330,7 +330,8 @@ module Rscons
end end
# If needed, do a blocking wait. # 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 completed_tcs << wait_for_threaded_commands
end end