mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 03:47:16 +02:00
removed counter-based protection on insertion
This commit is contained in:
@ -1589,7 +1589,7 @@ private:
|
|||||||
boost::uint32_t counter=0;
|
boost::uint32_t counter=0;
|
||||||
{
|
{
|
||||||
//auto lck=access(group_exclusive{},pos0);
|
//auto lck=access(group_exclusive{},pos0);
|
||||||
counter=insert_counter(pos0);
|
//counter=insert_counter(pos0);
|
||||||
}
|
}
|
||||||
if(unprotected_visit(
|
if(unprotected_visit(
|
||||||
access_mode,k,pos0,hash,std::forward<F>(f)))return 0;
|
access_mode,k,pos0,hash,std::forward<F>(f)))return 0;
|
||||||
@ -1610,7 +1610,8 @@ private:
|
|||||||
goto startover;
|
goto startover;
|
||||||
}
|
}
|
||||||
//auto lck=access(group_exclusive{},pos0);
|
//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 */
|
/* other thread inserted from pos0, need to start over */
|
||||||
pg->reset(n);
|
pg->reset(n);
|
||||||
goto startover;
|
goto startover;
|
||||||
|
Reference in New Issue
Block a user