You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading your code, I have two questions I’d like to ask:
When using parallel_flat_hash_map and passing a lock type through the template parameter, can the map still support operations like:
auto iter = map.find(key);
if (iter != map.end()) {
map.erase(iter);
}
or
map[key] = value;
Does node_hash_map prevent crashes caused by rehashing during concurrent reads and writes of different keys? Our program can guarantee that different threads only read or write distinct keys.
Best regards,
The text was updated successfully, but these errors were encountered:
No, these APIs cannot be made thread safe, but phmap has extended APIs which are thread safe (basically providing a lambda which is called under the lock protection). See this paragraph at the end of the README.
Dear Author,
After reading your code, I have two questions I’d like to ask:
or
Best regards,
The text was updated successfully, but these errors were encountered: