refs #438 Use compare_exchange_strong to avoid spurious failures.

This commit is contained in:
Mathew Sutcliffe
2015-06-06 18:01:46 +01:00
parent 5faa0d144c
commit a4ca75c5c7

View File

@@ -149,7 +149,7 @@ namespace BlackMisc
{ {
InitState e = NotInitialized; InitState e = NotInitialized;
InitState d = InitInProgress; InitState d = InitInProgress;
if (!m_initState.compare_exchange_weak(e, d)) { return; } if (!m_initState.compare_exchange_strong(e, d)) { return; }
// sync // sync
this->synchronize(); this->synchronize();