News for hackers. Stuff that matters.
Re:A little Golang way by krakensden on Wednesday August 05, 2015 @10:47PM (#10014274)
A higher cost for context switching. Lots of people work on apps with lots of i/o, and there is a long history of coroutine/callback/green thread architectures beating the pants off of thread per request architectures.
Re:A little Golang way by pcwalton on Wednesday August 05, 2015 @11:02PM (#10014319)
No, the context switching overhead tends to be minimal if you're using a well-tuned kernel. You're doing a context switch to the kernel for I/O in the first place, and in a green thread model you have to do a userspace context switch in addition to the context switch the kernel imposes to get back into your scheduler.
Re:A little Golang way by acconsta on Thursday August 06, 2015 @01:59PM (#10018180)
Are there benchmarks to support that? JVM greenthreads vs. linux user threads, for example?
Re:A little Golang way by pcwalton on Thursday August 06, 2015 @03:41PM (#10018867)
Both the JVM and Linux pthreads are 1:1.