Tornado 6.5 Documentationtornado.tcpserver — Basic IOStream-based TCP server Coroutines and concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f):my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via the yield0 码力 | 437 页 | 405.14 KB | 3 月前3
Tornado 6.5 DocumentationAsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that the yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via the yield decorator receives a Future from the generator, waits (without blocking) for that Future to complete, then “un- wraps” the Future and sends the result back into the generator as the result of the yield expression0 码力 | 272 页 | 1.12 MB | 3 月前3
julia 1.10.10Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 19.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 19.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 42.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 42.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 19.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 19.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 42.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 42.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.11.4Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 43.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 43.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 DocumentationComprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 43.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 43.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release NotesComprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 43.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 43.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.12.0 RC1Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 44.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 44.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 44.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 44.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.5 Generator Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 20.6 Indexing Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 44.7 Set-Like Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 44.8 Dequeues mathematical use. More precisely, the set of all finite-length strings S together with the string concatenation operator * forms a free monoid (S, *). The identity element of this set is the empty string, "". Whenever0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 14 条
- 1
- 2













