← Back to context

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.

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.