forked from boostorg/smart_ptr
Revert using a relaxed load before test_and_set; not necessary, and slower, with a proper yielding strategy as opposed to just pause-spinning
This commit is contained in:
1 parent
d35cf29b99
commit
8d79ceaf8a
1 file changed
+1
-1
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
bool try_lock()
|
||||
{
|
||||
return __atomic_load_n( &v_, __ATOMIC_RELAXED ) == 0 && __atomic_test_and_set( &v_, __ATOMIC_ACQUIRE ) == 0;
|
||||
return __atomic_test_and_set( &v_, __ATOMIC_ACQUIRE ) == 0;
|
||||
}
|
||||
|
||||
void lock()
|
||||
|
||||
Reference in new issue
Block a user