bottle.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:MCSManager-fsmodule 作者: Suwings 项目源码 文件源码
def run(self, handler):
        from twisted.web import server, wsgi
        from twisted.python.threadpool import ThreadPool
        from twisted.internet import reactor
        thread_pool = ThreadPool()
        thread_pool.start()
        reactor.addSystemEventTrigger('after', 'shutdown', thread_pool.stop)
        factory = server.Site(wsgi.WSGIResource(reactor, thread_pool, handler))
        reactor.listenTCP(self.port, factory, interface=self.host)
        if not reactor.running:
            reactor.run()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号