Add shutting down / shutdown states to state keeper

This commit is contained in:
Lion Kortlepel
2021-12-07 14:25:04 +01:00
parent 3ee83904a1
commit cd19ae0836
9 changed files with 54 additions and 1 deletions

View File

@@ -27,10 +27,12 @@ TLuaEngine::TLuaEngine()
}
mResourceServerPath = Path;
Application::RegisterShutdownHandler([&] {
Application::SetSubsystemStatus("LuaEngine", Application::Status::ShuttingDown);
mShutdown = true;
if (mThread.joinable()) {
mThread.join();
}
Application::SetSubsystemStatus("LuaEngine", Application::Status::Shutdown);
});
Start();
}