Class: StatsD::Instrument::BatchedSink::Buffer

Inherits:
SizedQueue
  • Object
show all
Defined in:
lib/statsd/instrument/batched_sink.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



81
82
83
# File 'lib/statsd/instrument/batched_sink.rb', line 81

def inspect
  "<#{self.class.name}:#{object_id} capacity=#{max} size=#{size}>"
end

#pop_nonblockObject



85
86
87
88
89
# File 'lib/statsd/instrument/batched_sink.rb', line 85

def pop_nonblock
  pop(true)
rescue ThreadError
  nil
end

#push_nonblock(item) ⇒ Object



75
76
77
78
79
# File 'lib/statsd/instrument/batched_sink.rb', line 75

def push_nonblock(item)
  push(item, true)
rescue ThreadError, ClosedQueueError
  nil
end