示例#1
0
 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)
示例#2
0
文件: ioloop.py 项目: 326029212/pyzmq
 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)
示例#3
0
 def current(*args, **kwargs):
     """Returns the current threads IOLoop.
     """
     #
     # install PuritanicalIOLoop as the active IOLoop implementation
     #
     PollIOLoop.configure(PuritanicalIOLoop)
     return PollIOLoop.current(*args, **kwargs)
示例#4
0
 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
示例#5
0
 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
示例#6
0
 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
示例#7
0
 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