diff options
| author | ruki <[email protected]> | 2022-05-14 12:23:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-14 12:23:13 +0800 |
| commit | 60b2376a7520df9a611a1051663da67b119925aa (patch) | |
| tree | f4fa39f9955b4726a0cae1a0aac745918b4e045b /xmake/modules/private/async/runjobs.lua | |
| parent | 6b8299c79e6b8f1548f52b02295a03dcfeccd995 (diff) | |
schedule local jobs
Diffstat (limited to 'xmake/modules/private/async/runjobs.lua')
| -rw-r--r-- | xmake/modules/private/async/runjobs.lua | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua index 9179e6a76..0089456bf 100644 --- a/xmake/modules/private/async/runjobs.lua +++ b/xmake/modules/private/async/runjobs.lua @@ -171,6 +171,7 @@ function main(name, jobs, opt) -- uses job pool? local jobname + local localjob = true if not jobs_cb then -- get job priority @@ -194,9 +195,13 @@ function main(name, jobs, opt) end -- we can only continue to run the job with distcc if local jobs are full - if index >= local_max and not job.distcc then - job_pending = job - break + if distcc and index >= local_max then + if job.distcc then + localjob = false + else + job_pending = job + break + end end -- get run function @@ -213,6 +218,12 @@ function main(name, jobs, opt) try { function() + if distcc then + local co_running = scheduler.co_running() + if co_running then + co_running:data_set("distcc.localjob", localjob) + end + end running_jobs_indices[i] = i if jobfunc then if opt.curdir then |
