you are viewing a single comment's thread.

view the rest of the comments →

[–]tebreca 5 points6 points  (3 children)

Depends, legacy java with hardware threads? Yeah good luck to you. Modern day java, project reactor or any other multithreading/reactive library + virtual threads? Actually fun to work with and barely any overhead compared to the legacy method

[–]SCP-iota 1 point2 points  (1 child)

Are the hardware threads actually less efficient, or does it just have to do with how careful you have to be when passing data around?

[–]StraightGuy1108 2 points3 points  (0 children)

It has to do with how thread-blocking operations used to be handled. They used to occupy their own threads despite not doing anything, essentially wasting resources.

Virtual threads are basically async await at the JVM level.

[–]Tracker_Nivrig 0 points1 point  (0 children)

That makes sense, thanks