|
Dear Group,
I have already spent 2 days trying to figure this
out, but to no avail. The problem is
I have a lot of c-functions pushed onto the Lua
global environment using
lua_pushcfunction(L, funcname);
lua_setglobal(L, "funcname");
I had a few scripts that used the Windows threading
API with lua threads.
Initially when only a few c-functions were pushed
on the stack, it worked really well, the lua_newthread function did pass all the
globals to the child thread.
But, now that I added a lot of global variables, it
appears that the globals are not passed on to the new thread.
This results in an error attempt calling a nil
value etc.
The way I figured this is by outputting all the
globals using the following
within the thread function
for n in
pairs(_G) do print(n) end
could there be a bug with Lua, that it works with
less number of c-functions pushed but stops with more number of
functions?
I would greatly appreciate it if some body writes
back with some information on this problem, if any one else has faced a similar
situation etc.
Thanks,
Ashwin
|