Closed
Description
C version does not compare the read value which allows another update to sneak in.
Compare: https://github.com/ruby-concurrency/concurrent-ruby/blob/master/ext/concurrent/atomic_reference.c#L52-L56 and http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/concurrent/atomic/AtomicReference.java#139