mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
skynet.coroutine.status may return blocked
This commit is contained in:
@@ -80,6 +80,19 @@ end
|
||||
|
||||
end -- end of skynetco.resume
|
||||
|
||||
function skynetco.status(co)
|
||||
local status = coroutine.status(co)
|
||||
if status == "suspended" then
|
||||
if skynet_coroutines[co] == false then
|
||||
return "blocked"
|
||||
else
|
||||
return "suspended"
|
||||
end
|
||||
else
|
||||
return status
|
||||
end
|
||||
end
|
||||
|
||||
function skynetco.yield(...)
|
||||
return coroutine_yield("USER", ...)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user