Book Image

Asynchronous Programming in Rust

By : Carl Fredrik Samson
5 (2)
Book Image

Asynchronous Programming in Rust

5 (2)
By: Carl Fredrik Samson

Overview of this book

Step into the world of asynchronous programming with confidence by conquering the challenges of unclear concepts with this hands-on guide. Using functional examples, this book simplifies the trickiest concepts, exploring goroutines, fibers, futures, and callbacks to help you navigate the vast Rust async ecosystem with ease. You’ll start by building a solid foundation in asynchronous programming and explore diverse strategies for modeling program flow. The book then guides you through concepts like epoll, coroutines, green threads, and callbacks using practical examples. The final section focuses on Rust, examining futures, generators, and the reactor-executor pattern. You’ll apply your knowledge to create your own runtime, solidifying expertise in this dynamic domain. Throughout the book, you’ll not only gain proficiency in Rust's async features but also see how Rust models asynchronous program flow. By the end of the book, you'll possess the knowledge and practical skills needed to actively contribute to the Rust async ecosystem.
Table of Contents (16 chapters)
Free Chapter
1
Part 1:Asynchronous Programming Fundamentals
5
Part 2:Event Queues and Green Threads
8
Part 3:Futures and async/await in Rust

Index

As this ebook edition doesn't have fixed pagination, the page numbers below are hyperlinked for reference only, based on the printed edition of this book.

Symbols

1:1 threading 29

A

address space 30

application binary interface (ABI) 97

arithmetic logic units (ALUs) 5

Assembly language 102

asymmetric coroutines 39, 40

async/await keywords 154, 155

asynchronous programming

versus concurrency 13

asynchronous Rust

challenges 265

future 269

async runtime

mental model 131-133

AT&T dialect 102

Await 39

B

base example

current implementation, changing 177

design 173-176

http.rs, modifying 180-183

improving 171, 173

main.rs, modifying 177

runtime.rs, modifying 177-179

b-async-await 156-160

bitflags 76, 78

bitmasks 75-78

Boost.Coroutine 112

BSD/macOS 51

C

callback based approaches 37

advantages and drawbacks 37

callee saved 101

calling convention...