diff options
| author | ruki <[email protected]> | 2024-03-18 23:52:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-18 23:52:01 +0800 |
| commit | 8f40dc67f661f46de7a073ea079587faebf0f1af (patch) | |
| tree | 9a56acb9dac1c1b90c13fd34a8d59acf20a3150b /xmake/modules/async/runjobs.lua | |
| parent | ca16db30058d8a512d73a7bee28e57f72de4c338 (diff) | |
use new progress
Diffstat (limited to 'xmake/modules/async/runjobs.lua')
| -rw-r--r-- | xmake/modules/async/runjobs.lua | 10 |
1 files changed, 5 insertions, 5 deletions
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, |
