diff options
| author | ruki <[email protected]> | 2021-05-18 23:49:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-18 23:49:05 +0800 |
| commit | f835bf4a93025bd4e8877cc16a5f287333d0f9cb (patch) | |
| tree | 2f73932ac39011d90309fecc42391cd601cd9b57 /xmake/modules/private/async | |
| parent | 9182c06e0aa51f7bcbdff3ec9477fb0ffe53c940 (diff) | |
improve runjobs
Diffstat (limited to 'xmake/modules/private/async')
| -rw-r--r-- | xmake/modules/private/async/runjobs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua index 6a2964a90..487d11798 100644 --- a/xmake/modules/private/async/runjobs.lua +++ b/xmake/modules/private/async/runjobs.lua @@ -56,7 +56,7 @@ function main(name, jobs, opt) -- init options op = opt or {} local total = opt.total or (type(jobs) == "table" and jobs:size()) or 1 - local comax = opt.comax or total + local comax = opt.comax or math.min(total, 4) local timeout = opt.timeout or 500 local group_name = name local jobs_cb = type(jobs) == "function" and jobs or nil |
