g_logLevel race condition #681
Unanswered
qazwsxedckll
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I call
static void setLogLevel(LogLevel level);in one thread and read log level#define LOG_INFO if (muduo::Logger::logLevel() <= muduo::Logger::INFO)in another thread, I think it is not concurrent safe. I am not so sure. Maybe an atomic variable or lock should be used withg_logLevel?Beta Was this translation helpful? Give feedback.
All reactions