.
Consequently, are Golang maps thread safe?
It's not thread-safe (or concurrent safe) when reading to/writing to happens with more than one goroutine. This is why the standard library provides a few tools at your disposal in the form of synchronization primitives.
Beside above, what does thread safe mean? Thread safety is a computer programming concept applicable to multi-threaded code. Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfill their design specifications without unintended interaction.
Secondly, is ConcurrentHashMap put thread safe?
ConcurrentHashMap class is thread-safe i.e. multiple thread can operate on a single object without any complications. At a time any number of threads are applicable for read operation without locking the ConcurrentHashMap object which is not there in HashMap. Default concurrency-level of ConcurrentHashMap is 16.
Is unmodifiableMap thread safe?
unmodifiableMap(deliverersMod); as well as the preceding operations where the map is populated. So your code is thread safe and your getDeliverers method will return a result based on the latest version of your map.