Could you give me ideas about what would be the best way to iterate through an unordered_map in a multithreaded-setting, perform some operations on the map in each iteration in the thread function, and return back to main? I'm thinking of using an atomic unordered_map iterator in the caller function, however, I couldn't find much about this. I am new to multi-threading; so I get a bit confused about synchronizing threading and iterating. Thank you!
Aucun commentaire:
Enregistrer un commentaire