that can lead to lock contention.
When this option is enabled, the new node is created before locking the parent node.
- After that, the parent is locked and checked whether the new node may be attached to the parent.
+ After that, the parent is locked and checked whether the new node can be attached to the parent.
In this case, false node creating can be performed, but locked section can be significantly small.
*/
template <bool Enable>
}
if ( bInserted ) {
+ ++m_ItemCounter;
m_stat.onInsertSuccess();
return update_flags::result_inserted;
}
testMap.erase( nItem );
}
CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_ASSERT_EX( testMap.empty(), ((long long) testMap.size()) );
+ CPPUNIT_CHECK( testMap.empty());
+ CPPUNIT_CHECK_EX( testMap.size() == 0, "size() == " << testMap.size() );
additional_check( testMap );
print_stat( testMap );
testMap.erase( (*m_parrString)[i] );
CPPUNIT_MSG( " Duration=" << timer.duration() );
CPPUNIT_CHECK( testMap.empty() );
+ CPPUNIT_CHECK_EX( testMap.size() == 0, "size() == " << testMap.size() );
additional_check( testMap );
print_stat( testMap );