I recently worked out a promising idea with Niko Matsakis and Yoshua Wuyts to solve what I’ll call the “context problem” in Rust. The idea takes inspiration from features in other languages like implicit arguments, effects, and object capabilities. While this is very much at the early stages of development, I’m sharing it here to hopefully get more perspectives and ideas from the Rust community. The problem Very often in programming we find ourselves needing access to some context obj...| Tyler Mandry
For just about as long as I’ve been working on async Rust, the topic of scoped tasks has come up. These are async tasks that borrow from their environment, and they would come in handy in a lot of situations. Last year the standard library stabilized thread::scope which allows synchronous threads to do this. You could imagine a similar API, but with async: asyncfn fanout(data: &Vec){task::scope(|s|{// Spawn subtasks to run in parallel.| Tyler Mandry