4 ms·
My point is that 'green threads/application level threading' is, IMO, not very useful in a language. As you say, it's the bit where putting them on actual threa
by joosters 9y ago
My point is that 'green threads/application level threading' is, IMO, not very useful in a language. As you say, it's the bit where putting them on actual threads is a win. A language that does its own green threads or co-operative multitasking is trying to do the kernel's job, and it will never be as good.
It's at the purported 'web scale' in the article (I'm guessing this means lots of tasks, or lots of work) that green threads least useful, because you know there that the workload will be big enough to keep all CPU cores busy, and multi-threading/multi-process is always going to be a win. Adding green threading to an already maxed out computer is just extra overhead for no benefit.
- felixgallo 9y agoit turns out that IO can dominate. When this happens, having green threads helps, because CPUs that would otherwise pend on IO availability will instead be freed to work on other tasks.
- eikenberry 9y agoYou shouldn't look at it just in terms of how well it can utilize system resources. It allows for language level concurrent programming support which facilitates different programming styles. Some people find this style of programming 'fits' them and are attracted to these languages as a medium for expression. So while other languages can use threads and async-IO perfectly well to keep all a systems resources utilized, that is not the only point of a programming language. Programming languages are primarily a means of communication.