-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Description
I want to be able to concurrently execute CPU-heavy tasks (on a rayon pool) and wait for IO futures (on a blocking pool) that consume the results of the computational tasks. Because I'm in an async context, ideally I would be able to futures::try_join! those tasks. I've managed to wrap rayon::spawn in a future using async_channel, but this is painful because I can only pass 'static data into rayon::spawn. I'd rather use something like rayon::scope, but this would necessarily block my async executor thread.
I think I need some kind of async fn from rayon that would function like rayon::scope but instead of blocking the thread, it returns a future that completes when the scoped threads complete.
joseluis
Metadata
Metadata
Assignees
Labels
No labels