Avoid Environment#process race condition
Race condition could have occurred if the last threaded command was gathered in the non-blocking wait and then a blocking wait was started because there was no job to run. Do not do a blocking wait in this case.
This commit is contained in:
parent
a99e6e81b2
commit
15e5d15424
@ -317,7 +317,7 @@ module Rscons
|
||||
end
|
||||
|
||||
# If needed, do a blocking wait.
|
||||
if job.nil? or @threaded_commands.size >= Rscons.n_threads
|
||||
if (completed_tcs.empty? and job.nil?) or @threaded_commands.size >= Rscons.n_threads
|
||||
completed_tcs << wait_for_threaded_commands
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user