|
A (lua) function only has one environment. If you remove it then that affects all activations of that function which may or may not be running in multiple threads.
1. load() 2. setfenv() of the function 3. lua_newthread() 4. lua_resume(L,0) If the sequence(2 thru 4) is repeated for 2 different threads, I get two different functions (according to debug) and two different environments. I am still confused. DB