def frequest(on_fiber, &blk)
    return capture_exception(&blk) unless on_fiber
    result, cthred = nil, Thread.current
    EM.schedule { Fiber.new { result = capture_exception(&blk); cthred.run }.resume }
    Thread.stop
    result
  end
def frequest(on_fiber, &blk)
    return capture_exception(&blk) unless on_fiber
    result, cthred = nil, Thread.current
    EM.schedule { Fiber.new { result = capture_exception(&blk); cthred.run }.resume }
    Thread.stop
    result
  end
Runs given block on a thread or fiber and returns result.
 If eventmachine is running on another thread, the fiber
 must be on the same thread, hence EM.schedule and the
 restriction that the given block cannot include rspec matchers.