News for hackers. Stuff that matters.
Re:Rust 1.63: Scoped Threads by tmpfs on Saturday June 18, 2022 @08:23PM (#31795034)
Oh, this is great to hear, no longer need to rely on crossbeam for scoped threads.

Whilst i can imagine this is useful in a variety of situations, it is particularly useful when trying to merge async and synchronous code which can sometimes be quite messy. Sometimes it is necessary to have a top-level runtime executing and spawn an async task from some synchronous code, the only way I know of to do this is spawn a thread and execute it in a separate runtime, without the 'static lifetime requirement that scoped threads allow makes it much easier to manage this kind of code.

Nested runtimes are a pattern to avoid if possible but sometimes it's necessary for complex programs.

Very excited to see this land, thanks to the Rust team!

There are no comments on this comment yet.