From 8f40dc67f661f46de7a073ea079587faebf0f1af Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 18 Mar 2024 23:52:01 +0800 Subject: use new progress --- xmake/modules/async/runjobs.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xmake/modules/async') diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua index 476efe08f..299b868df 100644 --- a/xmake/modules/async/runjobs.lua +++ b/xmake/modules/async/runjobs.lua @@ -40,12 +40,12 @@ end -- runjobs("test", function () os.sleep(10000) end, { progress = { chars = {'/','\'} } }) -- see module utils.progress -- -- local jobs = jobpool.new() --- local root = jobs:addjob("job/root", function (index, total) --- print(index, total) +-- local root = jobs:addjob("job/root", function (index, total, opt) +-- print(index, total, opt.progress) -- end) -- for i = 1, 3 do --- local job = jobs:addjob("job/" .. i, function (index, total) --- print(index, total) +-- local job = jobs:addjob("job/" .. i, function (index, total, opt) +-- print(index, total, opt.progress) -- end, {rootjob = root}) -- end -- runjobs("test", jobs, {comax = 6, timeout = 1000, on_timer = function (running_jobs_indices) end}) @@ -252,8 +252,8 @@ function main(name, jobs, opt) if opt.curdir then os.cd(opt.curdir) end - jobfunc(i, total, {progress = progress_wrapper}) count = count + 1 + jobfunc(i, total, {progress = progress_wrapper}) end running_jobs_indices[i] = nil end, -- cgit v1.3.1