xenium
|
A ForwardIterator to safely iterate vyukov_hash_map
.
More...
#include <vyukov_hash_map.hpp>
Public Member Functions | |
void | reset () |
Releases the bucket lock and resets the iterator. More... | |
A ForwardIterator to safely iterate vyukov_hash_map
.
Iterators hold a lock on the currently iterated bucket, blocking concurrent updates (emplace/erase) of that bucket, as well as grow operations or other iterators trying to acquire a lock on that bucket. In order to avoid deadlocks, consider the following guidelines:
reset
an iterator once it is no longer required.emplace
while holding an iterator.erase
with a key while holding an iterator.Since the bucket locks are exclusive, it is not possible to copy iterators; i.e., copy constructor, copy assignment and postfix increment are not available. Instead, use move construction, move assignment and prefix increment.
Iterators are not invalidated by concurrent update operations.
void xenium::vyukov_hash_map< Key, Value, Policies >::iterator::reset |
Releases the bucket lock and resets the iterator.
After calling reset
the iterator equals end()
.