mylesmegyesi/clojure.core — pull request #2 by patrickgombert (2014-01-04 15:41:22+00:00)
Title: Use java's AtomicReference to back atoms. Add compare-and-set-entity! in to the platform.

I think a test like...

```clojure
(defn sleep-and-return [len value]
(do
(Thread/sleep len)
value))

(testing "failing to update an atom"
(let [atm (atom "foo")
first-update (Thread. (swap! atm sleep-and-return 1000 "first"))
second-update (Thread. (swap! atm sleep-and-return 100 "second"))]
(Thread/sleep 1000)
(is (= "second" (deref atm)))))
```

would work but it's super brittle and you probably don't want it in the main test suite.
Thoughts?