----- Original Message -----
From: "Miles Sabin" <email@example.com>
Sent: Tuesday, April 25, 2000 3:26 AM
Subject: JavaMemoryModel: Immutable objects which aren't immutable
> I'm not sure that this is really an issue for this list or if
> it's already been raised ... my apologies if it isn't or it
Good point. I raised this much earlier with Josh Bloch and he changed some of the wording in the guide to be less misleading. Note that only the Collections.synchronizedXXX methods claim to be thread-safe.
I think Josh has been holding out on making more changes to the documentation in the hopes that immutables *will* be deemed thread-safe -- with the possible side-effect that bad timing might result in multiple initializations.
By the way, Josh, I think the description of the "fail-fast iterators" is still misleading:
"All of the new implementations have fail-fast iterators, which detect illegal concurrent modification, and fail quickly and cleanly (rather than behaving erratically)."
Actually, since no synchronization is used, they're only guaranteed to detect concurrent modification in the same thread, which is not what a "clued up" user would think.
-- Joe Bowbeer
------------------------------- JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:25 EDT