mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
bugfix: skynet.fork use table.pack to pack table
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user