File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes AtomicDouble class -- update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "AtomicDouble class -- update" Watch "AtomicDouble class -- update" New topic

AtomicDouble class -- update

Henry Wong

Joined: Sep 28, 2004
Posts: 20368

Six plus years ago, I wrote an AtomicDouble class. It was done for two reasons. I didn't like that Sun didn't have one in their concurrent atomic package, and I wanted to show that the atomic classes can be use to implement any atomic data structure -- without the need for synchronization.

This was included as part of the examples for O'Reilly. And is the first hit when searched for at Google. Cool.

Anyway, went through some code today, and found that my version is later than the version on the internet. So, for anyone who is interested, here is an update of the class....

Hope this helps,

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
It is sorta covered in the JavaRanch Style Guide.
subject: AtomicDouble class -- update
It's not a secret anymore!