Java Virtual Threads Preview
openjdk.java.net
Java Virtual Threads Preview
1–10 of 270 posts
Re: Java Virtual Threads Preview
#2Re: Java Virtual Threads Preview
#3Re: Java Virtual Threads Preview
#4Far fewer applications need this than many are led to believe. That said, this is always a welcome addition although this really doesn't add more than syntax over the stuff we've had in java.nio for a couple of decades
Re: Java Virtual Threads Preview
#5Re: Java Virtual Threads Preview
#6Far fewer applications need this than many are led to believe. That said, this is always a welcome addition although this really doesn't add more than syntax over the stuff we've had in java.nio for a couple of decades
You can always write a callback oriented program, but this is much nicer!
Re: Java Virtual Threads Preview
#7I was going to say with modern PCs this is kinda redundant now, but its still a language of small devices too, where it'll be welcome.
Re: Java Virtual Threads Preview
#8Green threads are back!
Re: Java Virtual Threads Preview
#9After all, a big reason that NodeJS won a lot of popularity on the server is that, for many types of common webserver workloads (i.e. lots of IO, relatively minor CPU usage), NodeJS can actually scale much better than Java with its thread-per-request model.
With these virtual threads, though, you could get the best of all possible worlds - a webserver that scales like NodeJS, but without some of the "CPU starvation" issues you can hit in Node if one executing request doesn't yield, and also without having to worry about "function coloring" like you do in Node with async vs. non-async functions.
Really, really fantastic development, have been waiting to see when this would come out.