summaryrefslogtreecommitdiff
path: root/xmake/modules/async
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-06 21:38:39 +0800
committerruki <[email protected]>2025-04-08 15:31:57 +0800
commit54227eb4e653a46b8eb9ad9642d7641db052288b (patch)
treeb13e7ed3a43a0126ef8b4c9c420ce7e51cca929b /xmake/modules/async
parentda540028213b73ca014bc7aa0f7938a12e344ee8 (diff)
fix progress
Diffstat (limited to 'xmake/modules/async')
-rw-r--r--xmake/modules/async/runjobs.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua
index d2af72843..adf68018d 100644
--- a/xmake/modules/async/runjobs.lua
+++ b/xmake/modules/async/runjobs.lua
@@ -163,6 +163,7 @@ function main(name, jobs, opt)
local abort_errors
local progress_wrapper = {}
local job_pending
+ local progress_factor = opt.progress_factor or 1.0
progress_wrapper.current = function ()
return count
end
@@ -171,7 +172,7 @@ function main(name, jobs, opt)
end
progress_wrapper.percent = function ()
if total and total > 0 then
- return math.floor((count * 100) / total)
+ return math.floor((count * progress_factor * 100) / total)
else
return 0
end