News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by mike_hearn on Sunday September 17, 2023 @06:22AM (#37543469)
It's not the same. The earliest JVMs weren't really thread safe at all but machines were single core so it didn't matter, you could just cooperatively multi-task.

Later HotSpot became thread safe (and fast - a rare achievement), so started using real OS threads so it could go multi-core.

Virtual threads are M:N threading. There are multiple native threads so you can exploit all the cores, and also user-space runtime managed stacks so you can pack way more threads into a process.

Re:Java 21 makes me like Java again by jjav on Sunday September 17, 2023 @02:39PM (#37548073)
> The earliest JVMs weren't really thread safe at all but machines were single core so it didn't matter, you could just cooperatively multi-task.

In the 90s we didn't have multiple cores but we had multiple CPUs. I started using java in '96 on a 2 CPU SPARC and the lack of real thread support was limiting. When green threads was dropped in favor of real (OS) thread support there was much rejoicing. I worked primarily in server performance back in those days.

> Virtual threads are M:N threading.

Solaris had M:N threads early on but it also was dropped.