API Reference


Brew Release
Brew MP 1.0.2
See Also
ILua_Release(), ILua_XMove(), ILua_Yield(), ILua_Resume(), ILua_GetStatus()
Creates and pushes on the stack a new Lua thread. The state of the new thread shares all global objects, such as tables, with the original state but has an independent execution stack.
  • pif
    a pointer to the ILua object
  • ppiLuaThread
    A new ILua pointer that represents this new thread. All of the interface methods will work with this thread pointer as if it was a separate state.
   AEEResult ILua_NewThread(ILua *pif, ILua **ppiLuaThread)
AEE_SUCCESS if the function succeeded, otherwise an error code.
Side Effect
The pointer returned may be released. However, the thread itself may remain subject to garbage collection like any Lua object, which may result in a dangling ILua state pointer. Care should be taken to make sure that there is a Lua reference to this thread while the C interface pointer is being used.
  • Follow