![]() Therefore, it would be wrong to write a program that depended on thisĮxception for its correctness: the fail-fast behavior of iterators should be used only toĭetect bugs. Fail-fast iterators throw ConcurrentModificationException on aīest-effort basis. Speaking, impossible to make any hard guarantees in the presence of unsynchronized concurrent Note that the fail-fast behavior of an iterator cannot be guaranteed as it is, generally Non-deterministic behavior at an undetermined time in the future. Thus, in the face ofĬoncurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, Iterator will generally throw a ConcurrentModificationException. The iterator is created, in any way except through the iterator's own remove method, the The iterator is fail-fast: If the MinMaxPriorityQueue is modified at any time after Returns an iterator over the elements contained in this collection, in no particular Since: 8.0 Author: Sverre Sundsdal, Torbjorn Gannholm
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |