Tornado 6.5 Documentationworld") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait()if __name__ decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a concurrent web spider why CPU blocking must be taken as seriously as other kinds of blocking, consider password hashing functions like bcrypt [http://bcrypt.sourceforge.net/], which by design use hundreds of milliseconds of CPU0 码力 | 437 页 | 405.14 KB | 3 月前3
Tornado 6.5 Documentationwrite("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": why CPU blocking must be taken as seriously as other kinds of blocking, consider password hashing functions like bcrypt, which by design use hundreds of milliseconds of CPU time, far more than a typical network background before triggering some future action in the application (as opposed to normal synchronous functions, which do every- thing they are going to do before returning). There are many styles of asynchronous0 码力 | 272 页 | 1.12 MB | 3 月前3
Rust 程序设计语言 简体中文版 1.85.0373 17. Async 和 await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 17.1. Futures 和 async 语法 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 17.2. 并发与 async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 17.5. 深入理解 async 相关的 traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .0 码力 | 562 页 | 3.23 MB | 27 天前3
julia 1.10.10. . . . . . . . . . . . . . . . . . . . . . . . . 25 5 Mathematical Operations and Elementary Functions 26 5.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Raw String Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 8 Functions 67 8.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 8.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 8.5 Operators With Special Names0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9. . . . . . . . . . . . . . . . . . . . . . . . . 25 5 Mathematical Operations and Elementary Functions 26 5.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Raw String Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 8 Functions 67 8.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 8.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 8.5 Operators With Special Names0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.11.4. . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Mathematical Operations and Elementary Functions 30 6.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Annotated Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 9 Functions 72 9.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.5 Operators With Special Names0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Mathematical Operations and Elementary Functions 30 6.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Annotated Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 9 Functions 72 9.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.5 Operators With Special Names0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release Notes. . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Mathematical Operations and Elementary Functions 30 6.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Annotated Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 9 Functions 72 9.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.5 Operators With Special Names0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.12.0 beta1. . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Mathematical Operations and Elementary Functions 30 6.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Annotated Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 9 Functions 72 9.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.5 Operators With Special Names0 码力 | 2047 页 | 7.41 MB | 3 月前3
Julia 1.12.0 Beta4. . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Mathematical Operations and Elementary Functions 30 6.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Annotated Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 9 Functions 72 9.1 Argument Passing Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.4 Operators Are Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.5 Operators With Special Names0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 24 条
- 1
- 2
- 3













