mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
use table.unpack instead of unpack
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user