Tornado 6.5 Documentation
wiki/Links] Hello, world Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait()if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 437 页 | 405.14 KB | 2 月前3Tornado 6.5 Documentation
Tornado Authors May 22, 2025CONTENTS 1 Quick links 3 2 Hello, world 5 3 Threads and WSGI 7 4 asyncio Integration 9 5 Installation 11 6 Documentation 13 6.1 User’s guide . . . . . . . . . . . . . linksCHAPTER TWO HELLO, WORLD Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous features;0 码力 | 272 页 | 1.12 MB | 2 月前3Coroutines and Structured Concurrency in Practice
fundamental primitive of structured concurrency • nursery in Python trio • task group in Python asyncio • task scope in Rust • coroutine scope in Kotlin • async_scope in nvidia/stdexec We also call it0 码力 | 103 页 | 1.98 MB | 5 月前3
共 3 条
- 1