當前位置: 首頁>>代碼示例>>Python>>正文


Python twisted.TornadoReactor方法代碼示例

本文整理匯總了Python中tornado.platform.twisted.TornadoReactor方法的典型用法代碼示例。如果您正苦於以下問題:Python twisted.TornadoReactor方法的具體用法?Python twisted.TornadoReactor怎麽用?Python twisted.TornadoReactor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在tornado.platform.twisted的用法示例。


在下文中一共展示了twisted.TornadoReactor方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from tornado.platform import twisted [as 別名]
# 或者: from tornado.platform.twisted import TornadoReactor [as 別名]
def setUp(self):
        self._saved_signals = save_signal_handlers()
        self._io_loop = IOLoop()
        self._reactor = TornadoReactor(self._io_loop) 
開發者ID:tao12345666333,項目名稱:tornado-zh,代碼行數:6,代碼來源:twisted_test.py

示例2: initialize

# 需要導入模塊: from tornado.platform import twisted [as 別名]
# 或者: from tornado.platform.twisted import TornadoReactor [as 別名]
def initialize(self, **kwargs):
            # When configured to use LayeredTwistedIOLoop we can't easily
            # get the next-best IOLoop implementation, so use the lowest common
            # denominator.
            self.real_io_loop = SelectIOLoop(make_current=False)
            reactor = TornadoReactor(io_loop=self.real_io_loop)
            super(LayeredTwistedIOLoop, self).initialize(reactor=reactor, **kwargs)
            self.add_callback(self.make_current) 
開發者ID:tao12345666333,項目名稱:tornado-zh,代碼行數:10,代碼來源:twisted_test.py

示例3: initialize

# 需要導入模塊: from tornado.platform import twisted [as 別名]
# 或者: from tornado.platform.twisted import TornadoReactor [as 別名]
def initialize(self):
            # When configured to use LayeredTwistedIOLoop we can't easily
            # get the next-best IOLoop implementation, so use the lowest common
            # denominator.
            self.real_io_loop = SelectIOLoop()
            reactor = TornadoReactor(io_loop=self.real_io_loop)
            super(LayeredTwistedIOLoop, self).initialize(reactor=reactor)
            self.add_callback(self.make_current) 
開發者ID:viewfinderco,項目名稱:viewfinder,代碼行數:10,代碼來源:twisted_test.py

示例4: setUp

# 需要導入模塊: from tornado.platform import twisted [as 別名]
# 或者: from tornado.platform.twisted import TornadoReactor [as 別名]
def setUp(self):
        self._saved_signals = save_signal_handlers()
        IOLoop.clear_current()
        self._io_loop = IOLoop(make_current=True)
        self._reactor = TornadoReactor()
        IOLoop.clear_current() 
開發者ID:tp4a,項目名稱:teleport,代碼行數:8,代碼來源:twisted_test.py

示例5: initialize

# 需要導入模塊: from tornado.platform import twisted [as 別名]
# 或者: from tornado.platform.twisted import TornadoReactor [as 別名]
def initialize(self, **kwargs):
            self.real_io_loop = PollIOLoop(make_current=False)  # type: ignore
            reactor = self.real_io_loop.run_sync(gen.coroutine(TornadoReactor))
            super(LayeredTwistedIOLoop, self).initialize(reactor=reactor, **kwargs)
            self.add_callback(self.make_current) 
開發者ID:tp4a,項目名稱:teleport,代碼行數:7,代碼來源:twisted_test.py


注:本文中的tornado.platform.twisted.TornadoReactor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。