4 ms·
Woh, I missed this (from that issue thread), "Merged and stabilized in 1.63!" Scoped threads are such a brilliant thing in the context of lifetimes.
by bluejekyll 4y ago
Woh, I missed this (from that issue thread), "Merged and stabilized in 1.63!"
Scoped threads are such a brilliant thing in the context of lifetimes.
- klabb3 4y agoIt's only lexically scoped though, so you don't have much use of them in thread pools and, importantly, async runtimes. Pre-1.0, we used to have JoinHandle<'a> which let you use the borrow checker to its full potential with multiple threads. This is a big practical hurdle today, where mutices are required even for simple cases which don't suffer data races in practice.