def __init__(self, io_loop, *args, **kwargs):
check_deprecated_kwargs(kwargs)
kwargs['_pool_class'] = functools.partial(MotorPool, io_loop)
kwargs['_connect'] = False
delegate = self.__delegate_class__(*args, **kwargs)
super(MotorClientBase, self).__init__(delegate)
if io_loop:
if not isinstance(io_loop, ioloop.IOLoop):
raise TypeError(
"io_loop must be instance of IOLoop, not %r" % io_loop)
self.io_loop = io_loop
else:
self.io_loop = ioloop.IOLoop.current()
评论列表
文章目录