The std::thread::scope() API from the standard library is very useful to create threads that capture their external environment (bound to a non-'static lifetime), and to auto-generate the thread-joining code. Unfortunately, it is missing from the loom::thread module.