Ruby Atomic

New Atomic Reference Implementation for JRuby

Jessica Thornsby

Ruby Atomic is a new Atomic reference implementation for JRuby and green or GIL-threaded Ruby implementations.

The gem’s Atomic class provides accessors for the contained value, and two update methods. With Ruby Atomic updates will run the provided block, passing the current value and replacing it with the block result if the value has not changed. The second method throws Atomic::ConcurrentUpdateError if the value changes before the update can happen.

comments powered by Disqus