CoronaLuaGetCoronaThread()

Revision Release 2021.3646
Keywords iOS, Solar2D Native, C, CoronaLua.h, CoronaLuaGetCoronaThread
See also CoronaLua.h
Corona C Functions

Overview

Gives you the main Lua state used by Corona given the Lua state corresponding to a coroutine. Returns NULL if the coroutine is not a coroutine that belongs to Corona's main Lua state. If coroutine happens to be Corona's main Lua state, then it returns coroutine.

Note

Lua uses the word "thread" to mean coroutine, for example a cooperative (not pre-emptive) thread.

Syntax

lua_State* CoronaLuaGetCoronaThread( lua_State *coroutine )