2 ms·
Because threads are traditionally created and scheduled by the OS, so it inevitably involves a costly context switch both first into the kernel and then back ag
by fwsgonzo 7y ago
Because threads are traditionally created and scheduled by the OS, so it inevitably involves a costly context switch both first into the kernel and then back again into the next thread, if one is ready.
Userspace threads are more light-weight, but probably still worse than just using fibers and co-routines. Depends on your needs, I suppose.