def current(*args, **kwargs): """Returns the current thread’s IOLoop. """ # install ZMQIOLoop as the active IOLoop implementation # when using tornado 3 if tornado_version >= (3, ): PollIOLoop.configure(ZMQIOLoop) return PollIOLoop.current(*args, **kwargs)
def current(*args, **kwargs): """Returns the current thread’s IOLoop. """ # install ZMQIOLoop as the active IOLoop implementation # when using tornado 3 if tornado_version >= (3,): PollIOLoop.configure(ZMQIOLoop) return PollIOLoop.current(*args, **kwargs)
def current(*args, **kwargs): """Returns the current threads IOLoop. """ # # install PuritanicalIOLoop as the active IOLoop implementation # PollIOLoop.configure(PuritanicalIOLoop) return PollIOLoop.current(*args, **kwargs)
def current(cls, *args, **kwargs): """Returns the current thread’s IOLoop. """ # install ZMQIOLoop as the active IOLoop implementation # when using tornado 3 PollIOLoop.configure(cls) _deprecated() loop = PollIOLoop.current(*args, **kwargs) return loop
def current(cls, *args, **kwargs): """Returns the current thread’s IOLoop. """ # install ZMQIOLoop as the active IOLoop implementation # when using tornado 3 if tornado_version >= (3,): PollIOLoop.configure(cls) loop = PollIOLoop.current(*args, **kwargs) if not isinstance(loop, cls): warnings.warn("IOLoop.current expected instance of %r, got %r" % (cls, loop), RuntimeWarning, stacklevel=2, ) return loop
def current(cls, *args, **kwargs): """Returns the current thread’s IOLoop. """ # install ZMQIOLoop as the active IOLoop implementation # when using tornado 3 if tornado_version >= (3, ): PollIOLoop.configure(cls) loop = PollIOLoop.current(*args, **kwargs) if not isinstance(loop, cls): warnings.warn( "IOLoop.current expected instance of %r, got %r" % (cls, loop), RuntimeWarning, stacklevel=2, ) return loop