summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-05 00:26:22 +0800
committerruki <[email protected]>2020-02-07 22:45:56 +0800
commita615d353a701e0d23e322060e5dd8e364d38dfee (patch)
tree57396b3b5e16f7ffe3a01035addebe1b3e5fd0ed
parent4f3d54cfbbfc2f7b7c2db32902af060d295422f6 (diff)
remove suspended co groups
-rw-r--r--xmake/core/base/scheduler.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua
index a687af1d9..6c3b511b1 100644
--- a/xmake/core/base/scheduler.lua
+++ b/xmake/core/base/scheduler.lua
@@ -270,6 +270,8 @@ function scheduler:_co_groups_resume()
return -1, errors
end
resumed_count = resumed_count + 1
+ self._CO_GROUPS_WAITING[name] = nil
+ self:_co_tasks_suspended():remove(co_waiting)
end
end
end
@@ -432,6 +434,7 @@ function scheduler:co_group_wait(name)
if count ~= #co_group then
self._CO_GROUPS_WAITING = self._CO_GROUPS_WAITING or {}
self._CO_GROUPS_WAITING[name] = running
+ self:_co_tasks_suspended():insert(running)
self:co_suspend()
end
until count == #co_group