Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    But... isn't atom a concurrency mechanism? I'm used to standard fields that are just a (fast, fast) memory location; this is confusing. Commented Apr 6, 2012 at 20:49
  • 4
    fields also have concurrency semantics, an atom just has sane ones. An atom is plenty fast. It's just a wrapper over one of these: docs.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/… Commented Apr 6, 2012 at 20:52
  • 1
    oh! cool! For anyone reading who doesn't want to examine the sources, deref and reset! do little more than standard java fields; (with class Box {Object value;}) box.value and box.value = ... Commented Apr 7, 2012 at 0:54