More/any async in std?

More/any async in std?
I noticed that there's a oneshot channel baking in std. I've been using third-party channels to pass data between the non-async and async worlds a lot, and it has been working great -- it reduced function coloring frustrations to near-zero. But for some of these primitives, I would prefer to use std -- if I could. There don't seem to be any async methods in std's oneshot. More broadly, I'm not aware of any async related functionality in std, beyond the building blocks needed to build Futures and executors. I'm curious why std is seemingly async-averse? I realize there a huge cans of worms related to things like fs, so I have no expectation to see any of that becoming async. But for simpler things like channels -- is there really no way to future-regret-proof async versions of those endpoints? Another one that I randomly happen to run into a surprising amount is wanting to .await thread::JoinHandle::join(). That's also something I can't help think should be doable, without risking future regrets. Has there been some decree made in the past that prohibits anything other than the foundational async bricks in std, or would it - at least in theory - be possible to get things like async channel support in std? Or is there a more complicated answer, like "an executor is free to screw up the semantics of Futures to the point where we can't even make an executor-agnostic channel endpoint"? 3 posts - 3 participants Read full topic

Take Your Experience to the Next Level

New

Download our mobile app for a faster and better experience.

Comments

0
U

Join the discussion

Sign in to leave a comment

0:000:00