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



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

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

#pop_nonblockObject



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

def pop_nonblock
  pop(true)
rescue ThreadError
  nil
end

#push_nonblock(item) ⇒ Object



70
71
72
73
74
# File 'lib/statsd/instrument/batched_sink.rb', line 70

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