| 511 | } |
| 512 | |
| 513 | void LuaEngine::threadPushFunction(int threadIndex, int functionIndex) { |
| 514 | lua_State* thread = lua_tothread(m_handleThread, threadIndex); |
| 515 | |
| 516 | int status = lua_status(thread); |
| 517 | lua_Debug ar; |
| 518 | if (status != LUA_OK || lua_getstack(thread, 0, &ar) > 0 || lua_gettop(thread) > 0) |
| 519 | throw LuaException(strf("Cannot push function to active or errored thread with status {}", status)); |
| 520 | |
| 521 | pushHandle(thread, functionIndex); |
| 522 | } |
| 523 | |
| 524 | LuaThread::Status LuaEngine::threadStatus(int handleIndex) { |
| 525 | lua_State* thread = lua_tothread(m_handleThread, handleIndex); |
no test coverage detected