Skip to content

Commit

Permalink
use xpall easy for debug
Browse files Browse the repository at this point in the history
use xpall to show more debug message
  • Loading branch information
niuys committed Oct 24, 2014
1 parent 8d2fcef commit 82bddd9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lualib/skynet/queue.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local skynet = require "skynet"
local coroutine = coroutine
local pcall = pcall
local xpcall = xpcall
local traceback = debug.traceback
local table = table

function skynet.queue()
Expand All @@ -17,7 +18,7 @@ function skynet.queue()
assert(ref == 0)
end
ref = ref + 1
local ok, err = pcall(f, ...)
local ok, err = xpcall(f, traceback, ...)
ref = ref - 1
if ref == 0 then
current_thread = nil
Expand All @@ -30,4 +31,4 @@ function skynet.queue()
end
end

return skynet.queue
return skynet.queue

0 comments on commit 82bddd9

Please sign in to comment.