Tornado 6.5 DocumentationIOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.1 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen. multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.4 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.3 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 264 页 | 1.06 MB | 1 年前3
Tornado 5.1 Documentation
instead. • Decorated coroutines support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. • Decorated coroutines can support IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen. multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.2 Documentation
IOLoop.run_in_executor instead. – support some shorthand for waiting on multiple objects by yielding a list or dict. Use tornado.gen.multi to do this in native coroutines. – can support integration with other IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = await multi ([http_client.fetch(url) for url in urls]) # responses is a list of HTTPResponses in the same order async def parallel_fetch_dict(urls): responses = await multi({url:0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 4.5 Documentation
yield keyword. For example, in a yield-based coroutine you can yield a list of Futures, while in a native coroutine you must wrap the list in tornado.gen.multi. This also eliminates the integration with concurrent IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that parallel_fetch_many(urls): responses = yield [http_client.fetch(url) for url in urls] # responses is a list of HTTPResponses in the same order @gen.coroutine def parallel_fetch_dict(urls): responses = yield0 码力 | 222 页 | 833.04 KB | 1 年前3
共 20 条
- 1
- 2













