summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGowa2017 <Gowa2017>2023-03-23 21:27:47 +0800
committerGowa2017 <Gowa2017>2023-03-23 21:27:47 +0800
commitce5134ac5a807f2e0f859372b10dd675c8d31fc6 (patch)
treece33eee59ed2d018fdc126baad25cce334c616d4
parentd512a42ba2abb0959b74ef3f9bfe05d042e47738 (diff)
downloadlua-language-server-ce5134ac5a807f2e0f859372b10dd675c8d31fc6.zip
add desc of skynet.task api
-rw-r--r--meta/3rd/skynet/library/skynet.lua9
1 files changed, 8 insertions, 1 deletions
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