class Concurrent::MutexAtomicReference

def get_and_set(new_value)

@!macro atomic_reference_method_get_and_set
def get_and_set(new_value)
  synchronize do
    old_value = @value
    @value = new_value
    old_value
  end
end