ConcurrentHashMap 多线程获取数据时保证其他线程不会插入或者影响??
大家讲道理2017-04-18 10:51:45
What the poster wants to ask is whether ConcurrentHashMap will block the put operation when getting?
No
because the array of ConcurrentHashMap is declared like this: transient volatile Node<K,V>[] table;
The get operation just reads the current table array: tab = table. There is no lock.
So it will not block the put operation