None
FR
Rust: Multithreading
[]
Emil Privér
One distinction between kernel threads and green threads is the responsibility for creating and destroying threads, which lies either with the kernel or the application. Async tasks (green threads) work by the runtime spinning up a couple of heavy threads (OS threads) and adding a layer on top of these threads to handle tasks. However, with scoped threads, this is not necessary, as scoped threads ensure that the threads are joined before the data is deallocated from memory.