class Concurrent::MVar

def modify!

Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet.
def modify!
  raise ArgumentError.new('no block given') unless block_given?
  @mutex.synchronize do
    value = @value
    @value = yield value
    if unlocked_empty?
      @empty_condition.signal
    else
      @full_condition.signal
    end
    apply_deref_options(value)
  end
end