class Object
Monkey patch object to make EM safe
Public Instance Methods
at_exit(&block)
click to toggle source
use {Empathy::EM::Kernel.at_exit} if we are in the reactor, Kernel.sleep otherwise
# File lib/empathy/object.rb, line 14 def at_exit(&block) kernel = Empathy.event_machine? ? Empathy::EM::Kernel : Kernel kernel.at_exit(&block) end
sleep(*args)
click to toggle source
use {Empathy::EM::Kernel.sleep} if we are in the reactor, Kernel.sleep otherwise
# File lib/empathy/object.rb, line 8 def sleep(*args) kernel = Empathy.event_machine? ? Empathy::EM::Kernel : Kernel kernel.sleep(*args) end