From b866bba144e8debcab3e742fb984a2b33b11d979 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 13 Dec 2023 13:51:05 +0100 Subject: [PATCH] removed counter-based protection on insertion --- include/boost/unordered/detail/foa/concurrent_table.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 3083a532..d5202d7f 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -1589,7 +1589,7 @@ private: boost::uint32_t counter=0; { //auto lck=access(group_exclusive{},pos0); - counter=insert_counter(pos0); + //counter=insert_counter(pos0); } if(unprotected_visit( access_mode,k,pos0,hash,std::forward(f)))return 0; @@ -1610,7 +1610,8 @@ private: goto startover; } //auto lck=access(group_exclusive{},pos0); - if(BOOST_UNLIKELY(insert_counter(pos0)++!=counter)){ + //if(BOOST_UNLIKELY(insert_counter(pos0)++!=counter)){ + if(false){ /* other thread inserted from pos0, need to start over */ pg->reset(n); goto startover;