Class: SystemMetrics::AsyncStore
- Inherits:
-
Object
- Object
- SystemMetrics::AsyncStore
- Defined in:
- lib/system_metrics/async_store.rb
Defined Under Namespace
Classes: VoidInstrumenter
Instance Method Summary collapse
-
#initialize ⇒ AsyncStore
constructor
A new instance of AsyncStore.
- #save(events) ⇒ Object
Constructor Details
#initialize ⇒ AsyncStore
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 |