class Concurrent::MutexAtomicReference

def _compare_and_set(old_value, new_value)

@!macro atomic_reference_method_compare_and_set
def _compare_and_set(old_value, new_value)
  synchronize do
    if @value.equal? old_value
      @value = new_value
      true
    else
      false
    end
  end
end