summaryrefslogtreecommitdiffstats
path: root/src/common/spin_lock.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/spin_lock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/spin_lock.cpp b/src/common/spin_lock.cpp
index 82a1d39ff..c7b46aac6 100644
--- a/src/common/spin_lock.cpp
+++ b/src/common/spin_lock.cpp
@@ -35,8 +35,9 @@ void thread_pause() {
namespace Common {
void SpinLock::lock() {
- while (lck.test_and_set(std::memory_order_acquire))
+ while (lck.test_and_set(std::memory_order_acquire)) {
thread_pause();
+ }
}
void SpinLock::unlock() {