Tornado 5.1 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado web framework and 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.concurrent0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 5.1 Documentation
org/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 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.0 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado web framework and 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.concurrent0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.1 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado web framework and 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.concurrent0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.2 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 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 码力 | 260 页 | 1.06 MB | 1 年前3
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.4 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 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 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 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 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 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 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.3 Documentation
networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.5 Coroutines and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 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 码力 | 264 页 | 1.06 MB | 1 年前3
共 237 条
- 1
- 2
- 3
- 4
- 5
- 6
- 24













