|
|
|
|
|
by pron
4516 days ago
|
|
The channels used are just like BlockingQueue. They're a queue with a synchronized condition variable. If user-mode threading is adopted, Quasar could work without instrumentation, but instrumentation is a very small part of the Quasar code base. Quasar gives you the scheduler, channels, actors, etc. The 10x performance boost comes from the fact that there can be non-negligible latency from the time you unpark a thread to the time it starts running, while for fibers that latency is much shorter. |
|
I guess I'm really wondering: let's say Java 9 mutexes use Linux 4's user-mode threading syscall; in that case do we need Quasar's scheduler, channels, actors etc. Or can we just use "good-old" threads and mutexes? Where would Quasar's benefits come from?
It sounds to me like the subtext to Google's patches is that rather than accepting the conventional wisdom that "threads don't scale", they've instead just fixed threads.