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:
1 parent
a99e6e81b2
commit
15e5d15424
1 file changed
+1
-1
@@ -317,7 +317,7 @@ module Rscons
|
|||||||
end
|
end
|
||||||
|
|
||||||
# If needed, do a blocking wait.
|
# 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
|
completed_tcs << wait_for_threaded_commands
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user