Class: Rackprof::GCNotify

Inherits:
Object
  • Object
show all
Includes:
Observable, Singleton
Defined in:
lib/rackprof/gc_notify.rb

Instance Method Summary collapse

Instance Method Details

#notifyObject



16
17
18
19
# File 'lib/rackprof/gc_notify.rb', line 16

def notify
  changed
  notify_observers
end

#startObject



8
9
10
11
12
13
14
# File 'lib/rackprof/gc_notify.rb', line 8

def start
  EM.run do
    EM.add_periodic_timer(3) do
      notify if count_observers > 0
    end
  end
end