module EventMachine
def self.synchrony(blk=nil, tail=nil, &block)
a Ruby Fiber such that async operations can be transparently
A convenience method for wrapping EM.run body within
def self.synchrony(blk=nil, tail=nil, &block) blk ||= block context = Proc.new { Fiber.new { blk.call }.resume } self.run(context, tail) end