Brew MP 1.0.2
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.
AEEResult ILua_NewThread(ILua *pif, ILua **ppiLuaThread)
AEE_SUCCESS if the function succeeded, otherwise an error code.
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.