Skip to content

Commit

Permalink
Fix process hang on fatal errors (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
diath authored Sep 29, 2021
1 parent 9eb1349 commit e73f6df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/framework/core/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit e73f6df

Please sign in to comment.