summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/async/runjobs.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua
index 1508a71d8..35f51a15a 100644
--- a/xmake/modules/async/runjobs.lua
+++ b/xmake/modules/async/runjobs.lua
@@ -192,23 +192,21 @@ function main(name, jobs, opt)
local distccjob = false
if not jobs_cb then
- -- get free job
- job = jobs:getfree()
- if not job then
- break
- end
-
- -- TODO
-- we can only continue to run the job with distcc if local jobs are full
if distcc and index >= local_max then
if job.distcc then
distccjob = true
else
- job_pending = job
break
end
end
+ -- get free job
+ job = jobs:getfree()
+ if not job then
+ break
+ end
+
-- get run function
jobfunc = job.run
jobname = job.name
@@ -241,7 +239,6 @@ function main(name, jobs, opt)
if job then
jobs:remove(job)
end
- print("finished", jobname)
end
running_jobs_indices[i] = nil
end,