public Lua NewThread() { var lua = new Lua(true); lua.translator = translator; lua.luaState = LuaDLL.lua_newthread(luaState); return(lua); }
public LuaThread(LuaState parentState, LuaFunction threadFunc) { // Copy from parent this.tracebackFunction = parentState.tracebackFunction; this.translator = parentState.translator; this.translator.interpreter = this; this.panicCallback = parentState.panicCallback; this.printFunction = parentState.printFunction; this.loadfileFunction = parentState.loadfileFunction; this.loaderFunction = parentState.loaderFunction; this.dofileFunction = parentState.dofileFunction; // Assign to store func = threadFunc; parent = parentState; // Create Thread L = LuaDLL.lua_newthread(parent.L); // Store thread in registry threadRef = LuaDLL.luaL_ref(parent.L, LuaIndexes.LUA_REGISTRYINDEX); }
public IntPtr LuaNewThread() { return(LuaDLL.lua_newthread(L)); }