[concurrency-interest] Re: AtomicInteger and AtomicLong should implement Number

Doug Lea dl@cs.oswego.edu
Wed, 7 Jan 2004 21:09:59 -0500

> I agree with Gregg, this AtomicDouble should exist

No way!

I did add to package spec:
  ... and doubles using <tt>Double.doubleToLongBits</tt> and
  <tt>Double.longBitsToDouble</tt> conversions.

This way, you don't need locks, just conversions. So, if someone would
like to make a set of classes that internally use the basic
cababilities of AtomicX to, say, make a full set of Number subclasses,
we give them all of the mechanism to efficiently do so. But we
still don't think it is good idea to do it otherwise.

Given that we are not going to change the names, superclasses, etc of
the AtomicX classes, can anyone suggest some additional wording we can
put in the package documentation to make sure people are not confused
about them?  (It is OK if they are not happy, we just don't want them
confused :-)