Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2477 Discussions

How to scan all elements in a concurrent_hash_map?

yuanhp
Beginner
463 Views
Hi,
I would like to implement a cache with concurrent_hash_map. But I need be able to scan the hash map even with concurrent remove and insertion. Are there some iterator I CAN use?

The iteratotrmustguarantee to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.

Thanks.

-Yuan
0 Kudos
1 Reply
Roman_D_Intel
Employee
463 Views
Hi Yuan,

there was a similar question in this thread. I hope it helps.

--
Roman
0 Kudos
Reply