Class: SystemMetrics::AsyncStore

Inherits:
Object
  • Object
show all
Defined in:
lib/system_metrics/async_store.rb

Defined Under Namespace

Classes: VoidInstrumenter

Instance Method Summary collapse

Constructor Details

#initializeAsyncStore

Returns a new instance of AsyncStore.



15
16
17
18
19
20
21
# File 'lib/system_metrics/async_store.rb', line 15

def initialize
  @queue = Queue.new
  @thread = Thread.new do
    set_void_instrumenter
    consume
  end
end

Instance Method Details

#save(events) ⇒ Object



23
24
25
# File 'lib/system_metrics/async_store.rb', line 23

def save(events)
  @queue << events
end