- {
- rcu_lock rcuLock;
-
- if ( pos.pArr->nodes[pos.nSlot].load(memory_model::memory_order_acquire) == slot) {
- if ( slot.ptr()) {
- if ( cmp( hash, hash_accessor()(*slot.ptr())) == 0 ) {
- // the item with that hash value already exists
- // Replace it with val
- if ( slot.ptr() == &val ) {
- stats().onUpdateExisting();
- return std::make_pair(true, false);
- }
-
- if ( pos.pArr->nodes[pos.nSlot].compare_exchange_strong(slot, node_ptr(&val), memory_model::memory_order_release, atomics::memory_order_relaxed)) {
- // slot can be disposed
- f( val, slot.ptr());
- pOld = slot.ptr();
- stats().onUpdateExisting();
- goto update_existing_done;
- }
-
- stats().onUpdateRetry();
+ if ( pos.pArr->nodes[pos.nSlot].load(memory_model::memory_order_acquire) == slot) {
+ if ( slot.ptr()) {
+ if ( cmp( hash, hash_accessor()(*slot.ptr())) == 0 ) {
+ // the item with that hash value already exists
+ // Replace it with val
+ if ( slot.ptr() == &val ) {
+ stats().onUpdateExisting();
+ return std::make_pair(true, false);