We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b4dba1 commit 5a3673cCopy full SHA for 5a3673c
section5/SpinLock.hpp
@@ -34,7 +34,7 @@ class SpinLock final
34
35
bool try_lock() noexcept
36
{
37
- return m_lock.test_and_set();
+ return !m_lock.test_and_set();
38
}
39
40
void unlock() noexcept
0 commit comments