예제 #1
0
파일: ioloop.py 프로젝트: twosixlabs/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)
예제 #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
파일: ioloop.py 프로젝트: hongjie7202/pyzmq
 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
파일: ioloop.py 프로젝트: Lothiraldan/pyzmq
 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