std::unordered_map<int, CustomClass*> map
that I share between two threads. When either thread loops through this map, it does so like this:
|
|
std::unordered_map<int, CustomClass*>
map
is modified within another thread. So yes, you need mutexes
Do I need to use a mutex here after all? |