fix(once-flag): make flag atomic (#6237)

This commit is contained in:
nerix
2025-05-25 16:24:44 +02:00
committed by GitHub
parent 85ae913413
commit e9b3146a0e
3 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -14,7 +14,6 @@ class OnceFlag
{
public:
OnceFlag();
~OnceFlag();
/// Set this flag and notify waiters
void set();
@@ -35,7 +34,7 @@ public:
private:
std::mutex mutex;
std::condition_variable condvar;
bool flag = false;
std::atomic<bool> flag = false;
};
} // namespace chatterino