Brian Estrada
11/03/2022, 1:45 PMConcurrentHashMap
and removing items at the same time?Sam
11/03/2022, 1:54 PMval iterator = map.entries.iterator()
while (iterator.hasNext()) {
iterator.next()
iterator.remove()
}
I think concurrent hash maps support removal via the iterator, though not all collections doChris Lee
11/03/2022, 1:55 PM