Tornado 6.5 Documentationnetworking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 http_client = AsyncHTTPClient() response = yield http_client.fetch(url) raise gen.Return(response.body) Coroutines are a little magical, but what they do internally is something like this: from tornado.concurrent the fetch is done. This is what makes coroutines asynchronous. Anything you can do with coroutines you can also do by passing callback objects around, but coroutines provide an important simplification0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.5 Documentationorg/projects/tornado/downloads/]. User’s guide Introduction Asynchronous and non-Blocking I/O Coroutines Queue example - a concurrent web spider Structure of a Tornado web application Templates and UI IOStream-based TCP server Coroutines and concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines tornado.process — Utilities Introduction Asynchronous and non-Blocking I/O Blocking Asynchronous Examples Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions0 码力 | 437 页 | 405.14 KB | 3 月前3
julia 1.10.10Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 9.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10 Scope of Variables 105 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 9.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10 Scope of Variables 105 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.11.4Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 DocumentationHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release NotesHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.13.0 DEVHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 RC1Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.6 Tasks (aka Coroutines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 11 Scope of Variables 111 fast • Designed for parallelism and distributed computation • Lightweight "green" threading (coroutines) • Unobtrusive yet powerful type system • Elegant and extensible conversions and promotions for Evaluation: Loops: while and for. • Exception Handling: try-catch, error and throw. • Tasks (aka Coroutines): yieldto. The first five control flow mechanisms are standard to high-level programming languages0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 12 条
- 1
- 2













