function Main(arg)
while true do
print("Hello World")
end
return 0
end
I run a simple lua file contains a unified loop, When I call Close(), the program will panic, error in line -> 1390。Please help me resoleve this problem
Unit test:
func Test_loop_close(t *testing.T) {
var s1 = `
function f()
while true do
print("Hello World")
end
end
f()
`
var luaVM = lua.NewState()
go func() {
err1 := luaVM.DoString(s1)
if err1 != nil {
panic(err1)
}
}()
time.Sleep(3 * time.Second)
luaVM.Close()
}
This is my lua code:
I run a simple lua file contains a unified loop, When I call
Close()
, the program will panic, error in line -> 1390。Please help me resoleve this problemUnit test:
Panic log: