3 ms·
> he main reason fibers/green threads/goroutines/etc have become popular lately is that common language runtimes and standard libraries don't resize thread stac
by soulbadguy 10y ago
> he main reason fibers/green threads/goroutines/etc have become popular lately is that common language runtimes and standard libraries don't resize thread stacks on the fly and tend to like very deep call stacks, so minimising your memory usage can be rather hard.
Green-thread, coroutine have been around for a long time, the recent popular is probably due to increase prevalence of people trying to solve the C10K problem.
Green thread, are more efficient both in term of memory consumption and context switching than kernel thread (even more so with compiler support).
The linux kernel might be able to handle millions of threads, but thruth is one can do it much more efficiently in userland