diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-09-23 22:18:38 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-09-23 22:18:38 -0500 |
commit | 728409ec6df086a990c0c4d84b0dab9382642848 (patch) | |
tree | 3cf4e236cdf58c88e2efdf0374c056dd708506bf | |
parent | Merge pull request #7906 (diff) | |
parent | easylogging++: fix missing logs (diff) | |
download | monero-728409ec6df086a990c0c4d84b0dab9382642848.tar.xz |
Merge pull request #7929
f4a745d easylogging++: fix missing logs (moneromooo-monero)
-rw-r--r-- | external/easylogging++/easylogging++.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc index bf877c018..cffc63a23 100644 --- a/external/easylogging++/easylogging++.cc +++ b/external/easylogging++/easylogging++.cc @@ -2968,8 +2968,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) { @@ -2978,6 +2978,7 @@ void Writer::processDispatch() { } return; } + in_dispatch = true; #if ELPP_LOGGING_ENABLED if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) { bool firstDispatched = false; @@ -3016,7 +3017,7 @@ void Writer::processDispatch() { m_logger->releaseLock(); } #endif // ELPP_LOGGING_ENABLED - in_dispatch.clear(); + in_dispatch = false; } void Writer::triggerDispatch(void) { |