|
On 11 Aug 2006, at 14:19, D Burgess wrote:
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.
Me too. What is executing steps 1 through 4? Some C code? In step 2 what function are you setfenving? In step 4 what function forms the thread's main thread? drj