use table.unpack instead of unpack

This commit is contained in:
云风
2013-11-19 20:57:39 +08:00
parent 0234387a2c
commit 3808b56628

View File

@@ -285,10 +285,12 @@ end
local fork_queue = {} local fork_queue = {}
local tunpack = table.unpack
function skynet.fork(func,...) function skynet.fork(func,...)
local args = { ... } local args = { ... }
local co = co_create(function() local co = co_create(function()
func(unpack(args)) func(tunpack(args))
end) end)
table.insert(fork_queue, co) table.insert(fork_queue, co)
end end