Rust Async and Threads Question

Hi,

I am new to Rust. I have a question regarding Rust's async / await feature, more specifically in the context of async_std. Does async / await work like Go's goroutines where m number of tasks is multiplexed into n number of threads? Or is it just an m number of tasks scheduled into a single thread?

Thanks.

Henry

1 Like

Yes, async Rust runs many tasks on a few threads. In the case of async-std, it uses a thread per cpu core, which is not configurable.

2 Likes

Thanks, Alice.