示例#1
0
 def start(self):
     old_current = IOLoop.current(instance=False)
     try:
         self._setup_logging()
         self.make_current()
         self.reactor.run()
     finally:
         if old_current is None:
             IOLoop.clear_current()
         else:
             old_current.make_current()
示例#2
0
 def __init__(self):
     # always use a new ioloop
     IOLoop.clear_current()
     IOLoop(make_current=True)
     super(_TestReactor, self).__init__()
     IOLoop.clear_current()