Esempio n. 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)
Esempio n. 2
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)
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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