Changed default back-off strategy
[libcds.git] / cds / container / michael_set.h
index b025e817736db13762bd8c396f6da9d82e105ca0..92bbbe05622d3c1b62515af4c95245396c4c87a8 100644 (file)
@@ -1,11 +1,11 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -332,7 +332,7 @@ namespace cds { namespace container {
             size_t nMaxItemCount,   ///< estimation of max item count in the hash set
             size_t nLoadFactor      ///< load factor: estimation of max number of items in the bucket
         ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor ))
-          , m_Buckets( bucket_table_allocator().allocate( bucket_count() ) )
+          , m_Buckets( bucket_table_allocator().allocate( bucket_count()))
         {
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 construct_bucket<bucket_stat>( it );
@@ -345,7 +345,7 @@ namespace cds { namespace container {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
@@ -382,7 +382,7 @@ namespace cds { namespace container {
             where \p val is the item inserted.
             The user-defined functor is called only if the inserting is success.
 
-            @warning For \ref cds_nonintrusive_MichaelList_gc "MichaelList" and \ref cds_nonintrusive_IterableList_gc "IterableList" 
+            @warning For \ref cds_nonintrusive_MichaelList_gc "MichaelList" and \ref cds_nonintrusive_IterableList_gc "IterableList"
             as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
             @ref cds_nonintrusive_LazyList_gc "LazyList" provides exclusive access to inserted item and does not require any node-level
             synchronization.
@@ -467,7 +467,7 @@ namespace cds { namespace container {
 #ifdef CDS_DOXYGEN_INVOKED
         std::pair<bool, bool>
 #else
-        typename std::enable_if< 
+        typename std::enable_if<
             std::is_same< Q, Q>::value && is_iterable_list< ordered_list >::value,
             std::pair<bool, bool>
         >::type
@@ -676,7 +676,7 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
             return iterator( it, &b, bucket_end());
         }
@@ -687,9 +687,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -732,9 +732,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@cond
         template <typename Q, typename Less>
@@ -743,9 +743,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -907,11 +907,11 @@ namespace cds { namespace container {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end() );
+            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator(( bucket_end() -1 )->cend(), bucket_end() - 1, bucket_end() );
+            return const_iterator(( bucket_end() -1 )->cend(), bucket_end() - 1, bucket_end());
         }
 
         template <typename Stat>