|
@pat_shaughnessy | |||||
|
I tried Rust’s new async/await feature for the first time: “Downloading 100,000 Files Using Async Rust” patshaughnessy.net/2020/1/20/down… @rustlang
|
||||||
|
||||||
|
Wesley Moore
@wezm
|
21. sij |
|
Good summary 👍
> Instead of launching an entirely new thread for each task, it runs all three tasks on the same thread.
I don’t think that’s the case. Tokio multiplexes m tasks into a pool of n threads so it’s able to use all available cores. (M:N threading)
|
||
|
|
||
|
Pat Shaughnessy
@pat_shaughnessy
|
21. sij |
|
Oh ok thanks! Yea I suspected it wasn’t quite that simple. I’ll update the post later today. I wonder if there’s a way to set m and n? Or at least know what those values are...
|
||
|
|
||