Fix process hang on fatal errors (#1163)

This commit is contained in:
diath
2021-09-29 21:03:12 +02:00
committed by GitHub
parent 9eb13494f9
commit e73f6df221

View File

@@ -25,6 +25,7 @@
//#include <boost/regex.hpp>
#include <framework/core/resourcemanager.h>
#include <framework/core/asyncdispatcher.h>
#ifdef FW_GRAPHICS
#include <framework/platform/platformwindow.h>
@@ -95,6 +96,10 @@ void Logger::log(Fw::LogLevel level, const std::string& message)
g_window.displayFatalError(message);
#endif
s_ignoreLogs = true;
// NOTE: Threads must finish before the process can exit.
g_asyncDispatcher.terminate();
exit(-1);
}
}