chickadee » clojurian » atom-compare-and-set!

atom-compare-and-set! atom old newprocedure

Atomically sets the value of atom to new if its current value is eq? to the given old value. Returns #t if the update was successful and #f if not.