logoalt Hacker News

frollogastontoday at 12:22 AM1 replyview on HN

Go's big advantage was M:N threads. Java's biggest flaw has been the lack of cooperative multitasking, which people worked around by mangling their code with promises. Now Java has M:N threads too thanks to Project Loom, but there's so much code written before that will never really go away.


Replies

pjmlptoday at 8:54 AM

Java already had M:N threads in the early days, aka green threads, because the JVM and Java specifications did not assert what kind of threading was to be provided.

Thus most JVM implementations had a mix of red (1:1:) and green (M:N) threads, eventually only red threads were kept in the surviving implementations.

With Project Loom now both models are officially supported and part of the specification.

show 1 reply