You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local luaproc = require("luaproc")
local x = function()
local luaproc = require("luaproc")
print( luaproc.receive( "achannel" ))
end
luaproc.newproc(x)
Doesn't work:
local luaproc = require("luaproc")
local x = function()
print( luaproc.receive( "achannel" ))
end
luaproc.newproc(x)
On the other hand, this works without require in the newproc block,
local luaproc = require("luaproc")
luaproc.newproc( [[
print(luaproc.receive("achannel"))
]] )
The text was updated successfully, but these errors were encountered:
My skills are rusty, but I'm pretty sure that the nested function x can capture an upvalue only if the upvalue is a string, boolean, number, or nil. It can't capture a function.
Works:
Doesn't work:
On the other hand, this works without require in the newproc block,
The text was updated successfully, but these errors were encountered: