summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-05 23:09:45 +0800
committerruki <[email protected]>2020-02-07 22:45:56 +0800
commita1e36f03bcae56c52c36ca1692725330cd173043 (patch)
treebf1085d08ff5fe430f41c41d7f26502d1a6ec448 /xmake/modules
parent97d20dc309b8064ab7bafc69a6784caa4df9b107 (diff)
add scheduler:co_group_waitobjs
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/async/runjobs.lua16
1 files changed, 1 insertions, 15 deletions
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua
index fcca3e65d..0e56963b3 100644
--- a/xmake/modules/private/async/runjobs.lua
+++ b/xmake/modules/private/async/runjobs.lua
@@ -22,20 +22,6 @@
import("core.base.scheduler")
import("core.base.hashset")
--- get waiting objects
-function _get_waiting_objects(group_name)
- local objs = hashset.new()
- for _, co in ipairs(scheduler.co_group(group_name)) do
- if not co:is_dead() then
- local obj = co:waitobj()
- if obj then
- objs:insert(obj)
- end
- end
- end
- return objs
-end
-
-- print back characters
function _print_backchars(backnum)
if backnum > 0 then
@@ -96,7 +82,7 @@ function main(name, jobfunc, opt)
-- show waitchars
waitindex = ((waitindex + 1) % #waitchars)
local tips = nil
- local waitobjs = _get_waiting_objects(group_name)
+ local waitobjs = scheduler.co_group_waitobjs(group_name)
if waitobjs:size() > 0 then
local names = {}
for _, obj in waitobjs:keys() do