use ThreadsWait (only for blocking thread waits)
This commit is contained in:
parent
f3bf325c88
commit
df420fdf5c
@ -1,6 +1,7 @@
|
|||||||
require "fileutils"
|
require "fileutils"
|
||||||
require "set"
|
require "set"
|
||||||
require "shellwords"
|
require "shellwords"
|
||||||
|
require "thwait"
|
||||||
|
|
||||||
module Rscons
|
module Rscons
|
||||||
# The Environment class is the main programmatic interface to Rscons. It
|
# The Environment class is the main programmatic interface to Rscons. It
|
||||||
@ -861,11 +862,7 @@ module Rscons
|
|||||||
if threads.empty?
|
if threads.empty?
|
||||||
raise "No threads to wait for"
|
raise "No threads to wait for"
|
||||||
end
|
end
|
||||||
loop do
|
ThreadsWait.new(*threads).next_wait
|
||||||
thread = find_finished_thread(threads, true)
|
|
||||||
return thread if thread
|
|
||||||
sleep 0.1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user