- return do_find( key, opt::details::make_comparator_from_less<Less>(), [&f]( node_type * pNode ) -> bool {
- node_scoped_lock l( pNode );
- mapped_type * pVal = pNode->m_pValue.load( memory_model::memory_order_relaxed );
- if ( pVal ) {
- f( *pVal );
- return true;
- }
- return false;
- } );
+ return do_find( key, opt::details::make_comparator_from_less<Less>(),
+ [&f]( sync_monitor& monitor, node_type * pNode ) -> bool {
+ assert( pNode != nullptr );
+ node_scoped_lock l( monitor, *pNode );
+ mapped_type * pVal = pNode->m_pValue.load( memory_model::memory_order_relaxed );
+ if ( pVal ) {
+ f( *pVal );
+ return true;
+ }
+ return false;
+ }
+ );