mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12: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
|
return prev
|
||||||
end
|
end
|
||||||
|
|
||||||
local tunpack = table.unpack
|
|
||||||
|
|
||||||
function skynet.fork(func,...)
|
function skynet.fork(func,...)
|
||||||
local args = { ... }
|
local args = table.pack(...)
|
||||||
local co = co_create(function()
|
local co = co_create(function()
|
||||||
func(tunpack(args))
|
func(table.unpack(args,1,args.n))
|
||||||
end)
|
end)
|
||||||
table.insert(fork_queue, co)
|
table.insert(fork_queue, co)
|
||||||
return co
|
return co
|
||||||
|
|||||||
Reference in New Issue
Block a user