3 ms·
That assumes you are using Tokio. As another poster said not only does the ecosystem fragment along the async/non async lines but along the runtime lines. Async
by zaphar 3y ago
That assumes you are using Tokio. As another poster said not only does the ecosystem fragment along the async/non async lines but along the runtime lines. Async is an extremely leaky abstraction. You are in a way making my point for me. If you want to avoid painful refactoring you should basically always start out tokio-async and shim in non async code as needed because going the other way is going to hurt.
- Kinrany 3y ago`spawn_blocking` is a single function and it is not complicated, it shouldn't be too hard for other runtimes to do the same. The end application does have to choose a runtime anyway and will have to stick with it because this area isn't standardized yet. This problem mostly affects the part of the ecosystem that wants to put complicated concurrency logic into libraries.
- cryptonector 3y ago`spawn_blocking` should be part of a core executor interface that all executors must provide.