Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add desc of skynet.task api #2024

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion meta/3rd/skynet/library/skynet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down