I see that tbb::concurrent_unordered_mapclose enough to std::unordered_mapbeing safe for concurrency. I also know that unsafe_eraseit is not simultaneously compatible with insertetc. The iterator docs also indicate that all existing iterators remain valid with insert, findetc.
The question is what makes unsafe_erasevoid any other iterator than the one that asked to delete?
std::unordered_mapand std::map, of course, have this behavior, but are not indicated in the documents concurrent_unordered_mapanywhere.
source
share