Tornado 6.5 Documentationin Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines: have additional integration with the concurrent.futures [https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run_in_executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 437 页 | 405.14 KB | 3 月前3
Tornado 6.5 Documentationin Tornado generally return placeholder objects (Futures), with the exception of some low- level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the have somewhere to go. • Decorated coroutines: – have additional integration with the concurrent.futures package, allowing the result of executor. submit to be yielded directly. For native coroutines, use way to call a blocking function from a coroutine is to use IOLoop.run_in_executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 272 页 | 1.12 MB | 3 月前3
Rust 程序设计语言 简体中文版 1.85.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 17.1. Futures 和 async 语法 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 17.3. 使用任意数量的 futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 探索如何使用异步模型来解决第十六章中遇到的一些挑战 • 了解多线程和异步如何互补,在很多场景中你甚至可以同时使用两者 377/562Rust 程序设计语言 简体中文版 Futures 和 async 语法 Rust 异步编程的关键元素是 futures 和 Rust 的 async 与 await 关键字。 future 是一个现在可能还没有准备好但将在未来某个时刻准备好的值。(相同的概念也出现在 很多语言中,有时被称为0 码力 | 562 页 | 3.23 MB | 26 天前3
julia 1.10.10second line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. @async is similar to @spawnat, but only runs process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9second line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. @async is similar to @spawnat, but only runs process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.11.4second line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. @async is similar to @spawnat, but only runs process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 Documentationsecond line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. @async is similar to @spawnat, but only runs process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release Notessecond line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. @async is similar to @spawnat, but only runs process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.13.0 DEVsecond line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. Threads.@spawn is similar to @spawnat, but only process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 RC1second line we asked it to add 1 to it. The result of both calculations is available in the two futures, r and s. The @spawnat macro evaluates the expression in the second argument on the process specified cache its value locally. Further fetch calls do not entail a network hop. Once all referencing Futures have fetched, the remote stored value is deleted. Threads.@spawn is similar to @spawnat, but only process and a "delete reference" message when a reference is locally garbage collected. Since Futures are write-once and cached locally, the act of fetching a Future also updates reference tracking0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 13 条
- 1
- 2













