mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #438 Use compare_exchange_strong to avoid spurious failures.
This commit is contained in:
@@ -149,7 +149,7 @@ namespace BlackMisc
|
||||
{
|
||||
InitState e = NotInitialized;
|
||||
InitState d = InitInProgress;
|
||||
if (!m_initState.compare_exchange_weak(e, d)) { return; }
|
||||
if (!m_initState.compare_exchange_strong(e, d)) { return; }
|
||||
|
||||
// sync
|
||||
this->synchronize();
|
||||
|
||||
Reference in New Issue
Block a user