Is the map returned by mutableMapOf(...) multihread-capable? E.g. is it a ConcurrentHashMap or something similiar?
If not, what map should I use in multithreading environment. e.g ConcurrentHashMap?
d
Dominaezzz
03/05/2022, 1:54 PM
It is not thread safe. Yes use ConcurrentHashMap.
👍 1
r
Rob Elliot
03/05/2022, 2:13 PM
Probably better asked in #C0B8MA7FA, incidentally.
Also - you can just CTL/CMD click through to see its definition in IntelliJ, which will show you it's a
kotlin.collections.LinkedHashMap
, which is an
expect class
.
Unfortunately IntelliJ doesn't make it easy to go from an