Re:Building a shared vision for Async Rust
by steveklabnik on Friday March 19, 2021 @09:41AM
(#26513189)
(To be clear, block_on is not in the Rust standard library.)
ah, darn, thanks!
So for anyone reading for the correct details: the block_on I was thinking of is part of the futures crate, which is not in std, it's not an "official library".
Re:Building a shared vision for Async Rust
by steveklabnik on Friday March 19, 2021 @10:59AM
(#26514088)
It's all good! It was proposed, but decided to have an RFC first. Your point is still correct, just wanted to make sure to clarify this detail :)
The Rust standard library's block_on uses a global ThreadPool, and the docs recommend using a LocalPool if you need finer grained control.
So, to answer your question it depends on the executor (the thing that implements block_on).