https://twitter.com/m_ou_se/status/1557742789693427712 has an additional writeup. Using VecDeque as a Read/Write circular buffer is cool.
Having scoped threads in std is great. First language, AFAIK, with this kind of structured concurrency in it’s stdlib. Definitely the first that also statically prevents data races.
Yeah I agree!
I was wondering - what remains missing from “structured concurrency”? Just looking again at  I can see cancellation, error propagation and being able to create and pass around and inject the scope object s elsewhere (for spawning background tasks that outlive whatever calls s.spawn) as being things that I can’t immediately see as being possible or not. Does anyone know - would these already be possible with what’s there now?
Error propagation is already possible (as (Scoped)JoinHandle<T>::join() returns whatever was returned by the scoped/spawned routine).
Lifetimes stop you from exfiltrating the scope handle outside the callback, yes. You can’t mem::swap it somewhere because the destination would need to have the exact same lifetime (and therefore, created from inside the callback).