anyserver.py 文件源码

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

项目:web3py 作者: web2py 项目源码 文件源码
def twisted(app, address, **options):
        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, app))
        reactor.listenTCP(address[1], factory, interface=address[0])
        reactor.run()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号