summaryrefslogtreecommitdiff
path: root/xmake/modules/async
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/async')
-rw-r--r--xmake/modules/async/runjobs.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua
index 35f51a15a..1f59a7359 100644
--- a/xmake/modules/async/runjobs.lua
+++ b/xmake/modules/async/runjobs.lua
@@ -236,9 +236,6 @@ function main(name, jobs, opt)
end
count = count + 1
jobfunc(i, total, {progress = progress_wrapper})
- if job then
- jobs:remove(job)
- end
end
running_jobs_indices[i] = nil
end,
@@ -272,6 +269,14 @@ function main(name, jobs, opt)
end
end
end
+ },
+ finally
+ {
+ function ()
+ if job then
+ jobs:remove(job)
+ end
+ end
}
}
end, index)