refactor: Enable unreachable cleanup logic in main()
> refactor `main_implemntation()` cleanup to run once on `launcher::shutdown()`, not sure why it was defined like that (unreachable code, at least for iidx) > not thread safe, but probably not needed (no obvious failures as well) > related to #1
This commit is contained in:
@@ -15,11 +15,15 @@
|
||||
|
||||
namespace launcher {
|
||||
|
||||
std::function<void()> on_shutdown = []() {};
|
||||
|
||||
void stop_subsystems() {
|
||||
// note that it is possible for stop_subsystems to be called multiple times
|
||||
// (e.g., crashing, and then closing the window)
|
||||
// therefore, subsystems need to be guarded against multiple unload attempts
|
||||
log_info("launcher", "stopping subsystems");
|
||||
on_shutdown(); //_BUG: not thread safe, required?
|
||||
on_shutdown = []() {};
|
||||
|
||||
// flush/stop logger
|
||||
logger::stop();
|
||||
|
||||
Reference in New Issue
Block a user