We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f87c4f commit e638302Copy full SHA for e638302
src/components/sync/queue_spinlock.h
@@ -22,11 +22,13 @@ class QueueSpinLock final {
22
is_owner.store(false);
23
}
24
25
- void SetOwner() { is_owner.store(true); }
+ void SetOwner() { is_owner.store(true, std::memory_order_acquire); }
26
27
void SetNext(Guard* guard) { next.store(guard); }
28
29
- bool IsOwner() const { return is_owner.load(); }
+ bool IsOwner() const {
30
+ return is_owner.load(std::memory_order_release);
31
+ }
32
33
bool HasNext() const { return next.load() != nullptr; }
34
0 commit comments