class Concurrent::MVar

def try_put!(value)

Non-blocking version of `put`, that returns whether or not it was successful.
def try_put!(value)
  @mutex.synchronize do
    if unlocked_empty?
      @value = value
      @full_condition.signal
      true
    else
      false
    end
  end
end