Class: ZK::ZKEventMachine::EventHandlerEM

Inherits:
EventHandler
  • Object
show all
Includes:
Logging
Defined in:
lib/z_k/z_k_event_machine/event_handler_e_m.rb

Overview

a small wrapper around the EventHandler instance, allowing us to deliver the event on the reactor thread, as opposed to calling it directly

Instance Method Summary collapse

Instance Method Details

#process(event) ⇒ Object



9
10
11
# File 'lib/z_k/z_k_event_machine/event_handler_e_m.rb', line 9

def process(event)
  EM.schedule { super(event) }
end

#synchronizeObject (protected)

we’re running on the Reactor, don’t need to synchronize (hah, hah, we’ll see…)



16
17
18
# File 'lib/z_k/z_k_event_machine/event_handler_e_m.rb', line 16

def synchronize
  yield
end