You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
skynet.fork(function()
while true do
local _stream<close> = stream
local succ, _result = pcall(read_watch_stream, self, _stream)
if not succ then
skynet.logerror("read_watch_stream", _result)
break
end
skynet.fork(watchcb, self, _result)
end
end)
依赖to-be-closed特性自动调用stream.close时,最后会wakeup dead coroutine:
-- SKYNET_SOCKET_TYPE_CLOSE = 3
socket_message[3] = function(id)
local s = socket_pool[id]
if s == nil then
return
end
s.connected = false
wakeup(s)
end
请问是否应该判断dead croutine,还是说从使用上避免?
The text was updated successfully, but these errors were encountered:
Repository owner
locked and limited conversation to collaborators
Jun 10, 2022
我的代码:
依赖to-be-closed特性自动调用stream.close时,最后会wakeup dead coroutine:
请问是否应该判断dead croutine,还是说从使用上避免?
The text was updated successfully, but these errors were encountered: