Fixed memory order
authorkhizmax <libcds.dev@gmail.com>
Wed, 24 May 2017 18:00:54 +0000 (21:00 +0300)
committerkhizmax <libcds.dev@gmail.com>
Wed, 24 May 2017 18:00:54 +0000 (21:00 +0300)
cds/sync/pool_monitor.h

index 622cd7f843e1bb41815000c8b84ff211fca21cdb..095e7210597ac668bd9acf11cdb7c1d6e1938193 100644 (file)
@@ -157,9 +157,10 @@ namespace cds { namespace sync {
 
             //@cond
             node_injection()
-                : m_RefSpin( 0 )
-                , m_pLock( nullptr )
-            {}
+                : m_pLock( nullptr )
+            {
+                m_RefSpin.store( 0, atomics::memory_order_release );
+            }
 
             ~node_injection()
             {
@@ -169,7 +170,7 @@ namespace cds { namespace sync {
 
             bool check_free() const
             {
-                return m_pLock == nullptr && m_RefSpin.load( atomics::memory_order_acquire ) == 0;
+                return m_pLock == nullptr && m_RefSpin.load( atomics::memory_order_relaxed ) == 0;
             }
             //@endcond
         };