mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
move trace into suspend
This commit is contained in:
@@ -44,6 +44,11 @@ end
|
||||
|
||||
-- suspend is local function
|
||||
function suspend(co, result, command, param, size)
|
||||
local info = c.trace_yield(trace_handle)
|
||||
if info then
|
||||
local ti = c.trace_delete(trace_handle, info)
|
||||
trace_func(info, ti)
|
||||
end
|
||||
if not result then
|
||||
error(debug.traceback(co,command))
|
||||
end
|
||||
@@ -256,11 +261,6 @@ local function dispatch_message(prototype, msg, sz, session, source, ...)
|
||||
error(string.format("Can't dispatch type %s : ", p.name))
|
||||
end
|
||||
end
|
||||
local info = c.trace_yield(trace_handle)
|
||||
if info then
|
||||
local ti = c.trace_delete(trace_handle, info)
|
||||
trace_func(info, ti)
|
||||
end
|
||||
while true do
|
||||
local key,co = next(fork_queue)
|
||||
if co == nil then
|
||||
|
||||
Reference in New Issue
Block a user