«летучий» в «HashMap» о «modCount»JAVA

Программисты JAVA общаются здесь
Anonymous
«летучий» в «HashMap» о «modCount»

Сообщение Anonymous »

Почему HashMap не использует Летучий для изменения modCount, чтобы поток мог немедленно узнать об изменении Map, когда другой поток меняет его?

Фрагмент ниже:

/**
* The number of times this HashMap has been structurally modified
* Structural modifications are those that change the number of mappings
in
* the HashMap or otherwise modify its internal structure (e.g.,
* rehash). This field is used to make iterators on Collection-views of
* the HashMap fail-fast. (See ConcurrentModificationException).
*/
transient int modCount;


Подробнее здесь: https://stackoverflow.com/questions/565 ... t-modcount

Вернуться в «JAVA»