Is it fine/safe if I have multiple threads running in parallel and each thread uses the same HashMap
instance? The HashMap
object will only be used to read data. There will be no writing data to the HashMap
in any of the threads.
To be clear, the HashMap
instance is a member of a base class and I will be calling the background threads in its subclasses. Those threads will then refer to the HashMap
object.