aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-09-23 22:19:16 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-09-23 22:19:16 -0500
commit4f5e8ccace1cfe245240b800196c6f196818c879 (patch)
treedd2f3369eeeb762d50d4ae6bbc4ed4642f2e0add
parentMerge pull request #7928 (diff)
parenteasylogging++: fix missing logs (diff)
downloadmonero-4f5e8ccace1cfe245240b800196c6f196818c879.tar.xz
Merge pull request #7930
807cbcd easylogging++: fix missing logs (moneromooo-monero)
-rw-r--r--external/easylogging++/easylogging++.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index 267770074..a765ee8cc 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -2984,8 +2984,8 @@ void Writer::initializeLogger(Logger *logger, bool needLock) {
}
void Writer::processDispatch() {
- static std::atomic_flag in_dispatch;
- if (in_dispatch.test_and_set())
+ static __thread bool in_dispatch = false;
+ if (in_dispatch)
{
if (m_proceed && m_logger != NULL)
{
@@ -2994,6 +2994,7 @@ void Writer::processDispatch() {
}
return;
}
+ in_dispatch = true;
#if ELPP_LOGGING_ENABLED
if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) {
bool firstDispatched = false;
@@ -3032,7 +3033,7 @@ void Writer::processDispatch() {
m_logger->releaseLock();
}
#endif // ELPP_LOGGING_ENABLED
- in_dispatch.clear();
+ in_dispatch = false;
}
void Writer::triggerDispatch(void) {