Re:Await in Rust
by shepmaster on Monday August 12, 2019 @02:15PM
(#20678248)
Yes, but you can run your blocking code on a thread which presents itself as a future:
- What is the best approach to encapsulate blocking I/O in future-rs? — https://stackoverflow.com/q/41932137/155423
If I do what I've always done in rust, which in use threads, I get lovely easy parallelization. Async only seems useful when your program doesn't do anything non trivial, but just dispatches to other things, as any one function that takes a long time blocks all other async functions until completion?