bugfix: skynet.fork use table.pack to pack table

This commit is contained in:
Cloud Wu
2015-11-12 15:41:41 +08:00
parent fa729d593b
commit 5edde990d6

View File

@@ -446,12 +446,10 @@ function skynet.dispatch_unknown_response(unknown)
return prev
end
local tunpack = table.unpack
function skynet.fork(func,...)
local args = { ... }
local args = table.pack(...)
local co = co_create(function()
func(tunpack(args))
func(table.unpack(args,1,args.n))
end)
table.insert(fork_queue, co)
return co