3 ms·
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 partic
by tmpfs 4y ago
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!