Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
2421 Discussions

How to scan all elements in a concurrent_hash_map?

yuanhp
Beginner
119 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
119 Views
Hi Yuan,

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

--
Roman
Reply