Tornado 6.4 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.4 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.4 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.4 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.3 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.3.3 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 264 页 | 1.06 MB | 1 年前3
Tornado 6.5 Documentationhttp_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client 15Tornado Documentation, Release 6.5.1 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.4 Documentation
guide 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 http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): fetch(url) return response.body Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 432 页 | 402.58 KB | 1 年前3
Tornado 6.4 Documentation
guide 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 http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): fetch(url) return response.body Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 432 页 | 402.58 KB | 1 年前3
Tornado 6.4 Documentation
guide 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 http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): fetch(url) return response.body Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 432 页 | 402.58 KB | 1 年前3
Tornado 6.3 Documentation
guide 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 http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): fetch(url) return response.body Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 423 页 | 398.18 KB | 1 年前3
Tornado 6.5 Documentationguide 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 fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): fetch(url) return response.body Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 437 页 | 405.14 KB | 3 月前3
共 20 条
- 1
- 2













