-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b49
-
generic
-
generic
Doug Lea writes:
The implementation of ConcurrentHashMap includes code that
is not compliant with the final version of JSR133 spec, which
means that there is a potential for it to fail. Beyond this,
this source code has been, and will continue to be a model
for sophisticated programmers writing sophisticated partially
lock-free but thread-safe code. The released version should
should not include nonconforming constructions that may be even
more harmful when emulated in other code.
I can confirm that ConcurrentHashMap is *the* class in the JDK that will
be examined as an example of code that has to know about and obey the
Java Memory Model -- it was used in my Stanford CS242 course, and that was
before the release of Tiger.
The implementation of ConcurrentHashMap includes code that
is not compliant with the final version of JSR133 spec, which
means that there is a potential for it to fail. Beyond this,
this source code has been, and will continue to be a model
for sophisticated programmers writing sophisticated partially
lock-free but thread-safe code. The released version should
should not include nonconforming constructions that may be even
more harmful when emulated in other code.
I can confirm that ConcurrentHashMap is *the* class in the JDK that will
be examined as an example of code that has to know about and obey the
Java Memory Model -- it was used in my Stanford CS242 course, and that was
before the release of Tiger.