joy
joy

Reputation: 741

fail-safe iterator

CopyOnWriteArrayList produce fail-safe iterator because everytime the "structure is modified" , the modification mean a new array is produced. the iterator iterate over the old copy of array? So, fail-safe mean it is safe from failing?

Upvotes: 0

Views: 144

Answers (2)

AlexWien
AlexWien

Reputation: 28747

see comparision and explanation at http://www.certpal.com/blogs/2009/09/iterators-fail-fast-vs-fail-safe/

Upvotes: 1

Related Questions