Tornado 6.5 DocumentationFutures in parallel: from tornado.gen import multi async def parallel_fetch(url1, url2): resp1, resp2 = await multi([http_client.fetch(url1), http_client.fetch(url2)]) async def parallel_fetch_many(urls): 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: http_client.fetch(url) for url in urls}) # responses In decorated coroutines, it is possible to yield the list or dict directly: @gen.coroutine def parallel_fetch_decorated(url1, url2): resp1, resp2 = yield [http_client.fetch(url1), http_client.fetch(url2)]0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.5 Documentationdicts whose values are Futures, and waits for all of those Futures in parallel: from tornado.gen import multi async def parallel_fetch(url1, url2): resp1, resp2 = await multi([http_client.fetch(url1) async def 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): In decorated coroutines, it is possible to yield the list or dict directly: @gen.coroutine def parallel_fetch_decorated(url1, url2): resp1, resp2 = yield [http_client.fetch(url1),0 码力 | 437 页 | 405.14 KB | 3 月前3
julia 1.10.10Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 22 Parallel Computing 292 23 Asynchronous Programming 293 23.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 25.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 25.6 Remote I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 34.20 Optimize network I/O during parallel execution . . . . . . . . . . . . . . . . . . . . 437CONTENTS vii 34.21 Fix deprecation warnings0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 22 Parallel Computing 292 23 Asynchronous Programming 293 23.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 25.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 25.6 Remote I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 34.20 Optimize network I/O during parallel execution . . . . . . . . . . . . . . . . . . . . 437CONTENTS vii 34.21 Fix deprecation warnings0 码力 | 1692 页 | 6.34 MB | 3 月前3
julia 1.13.0 DEVMulticast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 23 Parallel Computing 313 24 Asynchronous Programming 314 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 26.6 Remote The Main.main entry point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 41.3 Parallel mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 41.4 Startup0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 RC1Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 23 Parallel Computing 313 24 Asynchronous Programming 314 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 26.6 Remote The Main.main entry point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 41.3 Parallel mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 41.4 Startup0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 23 Parallel Computing 313 24 Asynchronous Programming 314 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 26.6 Remote The Main.main entry point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 41.3 Parallel mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 41.4 Startup0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 23 Parallel Computing 313 24 Asynchronous Programming 314 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 26.6 Remote The Main.main entry point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 41.3 Parallel mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 41.4 Startup0 码力 | 2057 页 | 7.44 MB | 3 月前3
julia 1.12.0 beta1Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 23 Parallel Computing 313 24 Asynchronous Programming 314 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 26.6 Remote The Main.main entry point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 41.3 Parallel mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 41.4 Startup0 码力 | 2047 页 | 7.41 MB | 3 月前3
Julia 1.11.4Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 23 Parallel Computing 310 24 Asynchronous Programming 311 24.1 Basic Task operations . . . . . . . . . . Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 26.5 Parallel Map and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 26.6 Remote I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 35.22 Optimize network I/O during parallel execution . . . . . . . . . . . . . . . . . . . . 467 35.23 Fix deprecation warnings . . . . .0 码力 | 2007 页 | 6.73 MB | 3 月前3
共 22 条
- 1
- 2
- 3













