summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-13 10:19:43 +0800
committerruki <[email protected]>2016-07-13 10:19:43 +0800
commitad41572d133d11d74e12d37e57d496aa26fe76db (patch)
tree531322956699aff2365ce3111e5ea5c64b9e9ba0 /xmake/core
parentc0f02d4654ea2b46732eacbacce8fc9ee80c6e9a (diff)
rewrite scheduling for compiling
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/base/os.lua4
-rw-r--r--xmake/core/sandbox/modules/process.lua5
2 files changed, 3 insertions, 6 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index ae93103eb..cf662aab3 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -327,7 +327,7 @@ function os.exec(cmd, outfile, errfile)
-- poll it
waitok, status = process.wait(proc, 0)
if waitok == 0 then
- coroutine.yield()
+ waitok, status = coroutine.yield(proc)
end
until waitok ~= 0
@@ -371,7 +371,7 @@ function os.execv(shellname, argv, outfile, errfile)
-- poll it
waitok, status = process.wait(proc, 0)
if waitok == 0 then
- coroutine.yield()
+ waitok, status = coroutine.yield(proc)
end
until waitok ~= 0
diff --git a/xmake/core/sandbox/modules/process.lua b/xmake/core/sandbox/modules/process.lua
index 12ae20fad..28d814078 100644
--- a/xmake/core/sandbox/modules/process.lua
+++ b/xmake/core/sandbox/modules/process.lua
@@ -121,11 +121,8 @@ function sandbox_process.waitlist(processes, timeout)
raise("wait processes(%d) failed(%d)", #processes, count)
end
- -- check infos
- assert(infos and count == #infos)
-
-- timeout or finished
- return count, infos
+ return infos
end
-- return module