class Jaeger::Reporters::RemoteReporter::Buffer
Public Class Methods
new()
click to toggle source
# File lib/jaeger/reporters/remote_reporter/buffer.rb, line 7 def initialize @buffer = [] @mutex = Mutex.new end
Public Instance Methods
<<(element)
click to toggle source
# File lib/jaeger/reporters/remote_reporter/buffer.rb, line 12 def <<(element) @mutex.synchronize do @buffer << element true end end
retrieve()
click to toggle source
# File lib/jaeger/reporters/remote_reporter/buffer.rb, line 19 def retrieve @mutex.synchronize do elements = @buffer.dup @buffer.clear elements end end