def query(name, *args)
      fiber, yielding = Fiber.current, true
      req = connection.send(name, *args)
      req.errback  { fiber.resume rescue yielding = false }
      req.callback {|response| fiber.resume(response) }
      Fiber.yield if yielding
    end
def query(name, *args)
      fiber, yielding = Fiber.current, true
      req = connection.send(name, *args)
      req.errback  { fiber.resume rescue yielding = false }
      req.callback {|response| fiber.resume(response) }
      Fiber.yield if yielding
    end
Turn an asynchronous redis query into a blocking call by pausing the
 fiber in which this code is running. Return the result of the query
 from this method, rather than passing it to a callback block.