To read a value from a hash map, the code must first find the value. If another thread adds a value and the first thread finds a value, it can frustrate the search. Essentially, a hash map could do something like:
calculate hash go to location hash in the array look to see if there a list iterate through the list until value is found
If this list is called a list of arrays, and another thread needs to resize it, this will be a big problem for a thread passing through it.
source share