Can you give me an code example to show how to do safe iteration of concurrent_hash_map? Document "How to lock the whole concurrent_hash_map not warping a portion of code with mutex?" just can't be opened now.
If you can afford not using erase(), concurrent_unordered_map is the best choice. Otherwise, there is a hackish way to traverse concurrent_hash_map if certain constraints are preserved: https://software.intel.com/en-us/blogs/2010/05/14/traversing-concurrent_hash_map-concurrently