Search code examples
c++concurrenthashmaptbb

How to convert tbb concurrent_hash_map to regular std::map?


I am working on some concurrent program and don't know how to convert tbb::concurrent_hash_map to regular std::map or get values, stored in the concurrent map in another way. Can anyone help?


Solution

  • I would do it the naive way, iterating the hashmap and adding the items to the std::map in the loop.