execute params fix
This commit is contained in:
parent
c1b6439938
commit
51bb937344
@ -1,7 +1,7 @@
|
||||
function mtscad.Context:execute(fn, ...)
|
||||
local params = ...
|
||||
local params = {...}
|
||||
local ctx = self:clone()
|
||||
self.job_context.enqueue(function() fn(ctx, params) end)
|
||||
self.job_context.enqueue(function() fn(ctx, unpack(params)) end)
|
||||
|
||||
return self
|
||||
end
|
@ -1,6 +1,9 @@
|
||||
|
||||
local another_lib = mtscad.load_module("another_lib/another_lib")
|
||||
|
||||
return function(ctx)
|
||||
return function(ctx, a, b, c)
|
||||
assert(a == 1)
|
||||
assert(b == 2)
|
||||
assert(c == 3)
|
||||
ctx:execute(another_lib)
|
||||
end
|
@ -2,5 +2,5 @@
|
||||
local mylib = mtscad.load_module("lib/mylib")
|
||||
|
||||
return function(ctx)
|
||||
ctx:execute(mylib)
|
||||
ctx:execute(mylib, 1, 2, 3)
|
||||
end, {success=true}
|
Loading…
x
Reference in New Issue
Block a user