mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Make sure crashes during logging cannot cause a deadlock
This commit is contained in:
@@ -19,7 +19,7 @@ namespace hex::log {
|
||||
[[maybe_unused]] void redirectToFile();
|
||||
[[maybe_unused]] void enableColorPrinting();
|
||||
|
||||
[[nodiscard]] std::mutex& getLoggerMutex();
|
||||
[[nodiscard]] std::recursive_mutex& getLoggerMutex();
|
||||
[[nodiscard]] bool isLoggingSuspended();
|
||||
|
||||
struct LogEntry {
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace hex::log {
|
||||
|
||||
wolv::io::File s_loggerFile;
|
||||
bool s_colorOutputEnabled = false;
|
||||
std::mutex s_loggerMutex;
|
||||
std::recursive_mutex s_loggerMutex;
|
||||
bool s_loggingSuspended = false;
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace hex::log {
|
||||
|
||||
namespace impl {
|
||||
|
||||
std::mutex& getLoggerMutex() {
|
||||
std::recursive_mutex& getLoggerMutex() {
|
||||
return s_loggerMutex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user