From ce5134ac5a807f2e0f859372b10dd675c8d31fc6 Mon Sep 17 00:00:00 2001 From: Gowa2017 Date: Thu, 23 Mar 2023 21:27:47 +0800 Subject: add desc of skynet.task api --- meta/3rd/skynet/library/skynet.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/3rd/skynet/library/skynet.lua b/meta/3rd/skynet/library/skynet.lua index f09d996c..0e4d19dd 100644 --- a/meta/3rd/skynet/library/skynet.lua +++ b/meta/3rd/skynet/library/skynet.lua @@ -471,7 +471,14 @@ function skynet.stat(what) end ---返回任务信息 ----@param ret any +---这里说的任务是指:服务发出了请求,但未收到响应,已挂起的协程 +---当参数ret的值为: +--- nil: 返回挂起的协程数量 +--- "init": 返回 traceback(init_thread) +--- table: 所有挂起协程的状态信息 +--- number :代表一个会话ID,显示此会话状态信息 +--- thread: 某个协程的信息 +---@param ret nil|number|table|string function skynet.task(ret) end -- cgit v1.2.3