[jdom-interest] Re: Stack & Threads
Joseph Bowbeer
jozart at csi.com
Tue Mar 5 23:42:38 PST 2002
Clarification: Despite its name, ConcurrentModificationException is only
guaranteed to fail-fast if modifications are made in the same thread.
Modifications made in a separate thread may not be visible to the thread in
question until both threads synchronize on the same object. (A bit of a
catch-22.)
--- original message ---
From: "Alex Rosen" <arosen at silverstream.com>
Subject: RE: [jdom-interest] Stack & Threads
Date: Tue, 5 Mar 2002 13:40:15 -0500
Jason Hunter writes:
> The concurrent modification checking follows the collections model with
> "fail fast" behavior -- actions aren't synchronized, but you do get an
> exception if the data you're relying on has been altered by another
> thread.
... or in the same thread, but not via the iterator. The
concurrent-modification-checking code is only in the iterator, so that we'll
fail-fast if someone changes the underlying list out from under us.
Alex
More information about the jdom-interest
mailing list