From 61141e77032daef49cc9f627c1f833fcbb00eaba Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 8 Apr 2024 23:07:53 +0800 Subject: improve distcc --- xmake/modules/async/runjobs.lua | 15 ++++++--------- 1 file 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, -- cgit v1.3.1