lib/garcon/task/read_write_lock.rb
# Returns a string representing *obj*. Includes the current reader and
# writer counts.
#
Returns a string representing *obj*. Includes the current reader and
writer counts.
Returns a string representing * obj * . Includes the current reader and writer counts .
def to_s
      c = @counter.value
      s = if running_writer?(c)
            "1 writer running, "
          elsif running_readers(c) > 0
            "#{running_readers(c)} readers running, "
          else
            ""
          end
      "#<ReadWriteLock:#{object_id.to_s(16)} #{s}#{waiting_writers(c)} writers waiting>"
    end
def to_s c = @counter . value s = if running_writer? ( c ) "1 writer running, " elsif running_readers ( c ) > 0 "#{running_readers(c)} readers running, " else "" end "#<ReadWriteLock:#{object_id.to_s(16)} #{s}#{waiting_writers(c)} writers waiting>" end
Returns a string representing *obj*.
Returns a string representing * obj * .