summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-10-29 13:10:26 +0800
committerruki <[email protected]>2023-10-29 13:10:26 +0800
commit567411537499c5a3557580d44b36fe0be6cf5ef7 (patch)
tree201591fde9992b240b7f99d0f2654b1c7d7679b9
parentd61d953b43fca1d3e68122036df4ef40277177ae (diff)
kill all waited objects in group
-rw-r--r--xmake/modules/async/runjobs.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua
index 88f8d552f..f4c7f38bb 100644
--- a/xmake/modules/async/runjobs.lua
+++ b/xmake/modules/async/runjobs.lua
@@ -257,6 +257,20 @@ function main(name, jobs, opt)
if abort_errors == nil then
abort_errors = errors
end
+
+ -- kill all waited objects in this group
+ local waitobjs = scheduler.co_group_waitobjs(group_name)
+ if waitobjs:size() > 0 then
+ for _, obj in waitobjs:keys() do
+ if obj:otype() == scheduler.OT_PROC then
+ obj:kill()
+ elseif obj:otype() == scheduler.OT_SOCK then
+ -- TODO
+ elseif obj:otype() == scheduler.OT_PIPE then
+ -- TODO
+ end
+ end
+ end
end
}
}