Comprehensive Rust ?64.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 64.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 64.3 Runtimes . scheduling using threads and mutexes) and async/await con- currency (cooperative multitasking using futures). Non-Goals Rust is a large language and we won't be able to cover all of it in a few days. Some asynchronous operation is based on ”futures”, which represent work that may be completed in the future. Futures are ”polled” until they signal that they are complete. Futures are polled by an async runtime0 码力 | 378 页 | 1009.46 KB | 1 年前3
 Concurrency in Rustruns blazingly fast, prevents segfaults, and guarantees thread safety. Concurrency? Libraries Futures Rust? What’s concurrency? In computer science, concurrency is a property of systems in which Conditions • Deadlocks • Use after free • Double free Exploitable! Concurrency? Libraries Futures Rust? What’s Rust? Rust is a systems programming language that runs blazingly fast, prevents one is unsynchronized • at least one is a write Aliasing! Mutation! Concurrency? Libraries Futures Rust? Rust Concurrency Libs • Language only provides ownership/borrowing • Libraries implement0 码力 | 43 页 | 648.31 KB | 1 年前3
 Comprehensive Rust(English) 20241263.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 63.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 63.3 Runtimes . scheduling using threads and mutexes) and async/await con- currency (cooperative multitasking using futures). 11 Non-Goals Rust is a large language and we won't be able to cover all of it in a few days asynchronous operation is based on ”futures”, which represent work that may be completed in the future. Futures are ”polled” until they signal that they are complete. Futures are polled by an async runtime0 码力 | 382 页 | 1.00 MB | 10 月前3
 Comprehensive Rust(Português do Brasil) 20241264.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 64.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 64.3 Tempos de Execução utilizando threads e mutexes) quanto concorrência async/await (multitarefa cooperativa utilizando futures). 11 Fora do escopo Rust é uma linguagem extensa e não conseguiremos cobrir tudo em poucos dias assíncrona do Rust é baseada em ”futures”, que representam trabalho que pode ser concluído no futuro. As futures são ”polled” até que elas sinalizem que estão completas. As futures são polled por um runtime0 码力 | 389 页 | 1.05 MB | 10 月前3
 Comprehensive Rust(Ukrainian) 20241263.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 63.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 63.3 Середовища потоків і м'ютексів), так і async/await конкурентність (кооперативна багатозадачність з використанням futures). 11 За рамками курсу Rust це об'ємна мова, і ми не зможемо охопити її за кілька днів. Теми, що 10 хвилин Futures 4 хвилини Середовища виконання 10 хвилин Завдання 10 хвилин 63.1 async/await На високому рівні асинхронний код Rust дуже схожий на ”звичайний” послідовний код: use futures::executor::block_on;0 码力 | 396 页 | 1.08 MB | 10 月前3
 Comprehensive Rust(Persian	) 20241264.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 64.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 64.3 Runtimes . � � � mutex � � ( � async/await concurrency (multitasking � � � � � � � ( � � � � � � � � � � � futures � � � � � � � � � � � � � � � . 11 � � � � � � � � � � � � � � � � � � � � � � Rust , � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . � � � � � � Rust asynchronous � � � � � � ” futures ” � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . future0 码力 | 393 页 | 987.97 KB | 10 月前3
 Comprehensive Rust(简体中文) 20241263.1 async/await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 63.2 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 63.3 Runtimes . 330 63.5 异步通道 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 64 Futures Control Flow 332 64.1 加入 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 进行裸机(嵌入式)开发。课程内容涵盖微控制器和应用 处理器。 • 并发:为期一天的课程,介绍 Rust 中的并发性。我们将涵盖传统并发(使用线程和互斥锁进行抢占 式调度)和 async/await 并发(使用 futures 进行协作式多任务处理)。 非目标 Rust 是一门庞大的语言,短短几天的课程无法覆盖其全部内容。本课程不包括以下内容: • 学习如何开发宏:请参阅 Rust Book 的第 19.5 章0 码力 | 359 页 | 1.33 MB | 10 月前3
 Comprehensive Rust(한국어) 202412339 63.5 비동기채널 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 64 Futures Control Flow 341 64.1 Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O 들을 효과적으로 식별해 주 는 프리미티브를 제공하기 때문입니다. Rust 의 비동기 작업은 ”futures”를 기반으로 하며 이는 미래에 완료될 수있는 작업을 나타냅니다. Futures 는 완료되었다는 신호를 보낼 때까지”폴링”됩니다. Futures 는 비동기 런타임에 의해 폴링되며, 비동기 런타임에는 여러 다양한종류가 있습니다. 비교 • 파이썬에도 Promise 가 처리되는 세부 과정이 숨겨집니다. 63.1 async/await 겉에서 보았을 때, 비동기 Rust 코드는 일반적인 절차적 코드와 매우유사합니다. use futures::executor::block_on; async fn count_to(count: i32) { for i in 1..=count { println!("수: {i}개!");0 码力 | 369 页 | 1.29 MB | 10 月前3
 Comprehensive Rust338 63.5 비동기채널 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 64 Futures Control Flow 340 64.1 Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O 들을 효과적으로 식별해 주 는 프리미티브를 제공하기 때문입니다. Rust 의 비동기 작업은 ”futures”를 기반으로 하며 이는 미래에 완료될 수있는 작업을 나타냅니다. Futures 는 완료되었다는 신호를 보낼 때까지”폴링”됩니다. Futures 는 비동기 런타임에 의해 폴링되며, 비동기 런타임에는 여러 다양한종류가 있습니다. 비교 • 파이썬에도 Promise 가 처리되는 세부 과정이 숨겨집니다. 63.1 async/await 겉에서 보았을 때, 비동기 Rust 코드는 일반적인 절차적 코드와 매우유사합니다. use futures::executor::block_on; async fn count_to(count: i32) { for i in 1..=count { println!("수: {i}개!");0 码力 | 368 页 | 1.29 MB | 1 年前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 | 29 天前3
共 18 条
- 1
 - 2
 













