Comment by jeremyjh
9 hours ago
Java's virtual threads are not preemptive. Yes there is a paper where they call them preemptive but they define the term differently to claim it. Code stuck in a tight loop is not preempted.
9 hours ago
Java's virtual threads are not preemptive. Yes there is a paper where they call them preemptive but they define the term differently to claim it. Code stuck in a tight loop is not preempted.
Well, go preempts at function calls, does it not? So a CPU-heavy inner loop calculating everything will fail to preempt in both languages - is this really a hill worth dying on?
Quite obviously the meaningful distinction is from manually inserted preempt points, like async/await languages.
> So a CPU-heavy inner loop calculating everything will fail to preempt
They fixed that in Go a while ago.
https://go.dev/doc/go1.14#runtime