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:
@ -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