Java 19 And Beyond | New Parallelism Through Virtual Threads And Structured Concurrency

Опубликовано: 18 Октябрь 2024
на канале: DevXplaining
1,382
55

Java 19 was just released, and Java 21 is coming up fast too. I like to keep an eye on things coming up, so I wanted to share with you a video on parallelism features coming up in future Java releases. Java 19 parallelism will bring you two very cool things that originate from project Loom: Virtual Threading, and Structured Concurrency. In this little video, I'll explain what they are, and what they are good for, and will run a million threads in parallel just because I can. Join me for 15 minutes and perhaps learn something new.

As always, if you get value or entertainment from this video, click the thumbs-up button to like it, and drop any questions or comments below the video. If you like to stay tuned to the next videos, remember to also subscribe and click that bell icon for notifications.

Timecodes:
0:00 - What's coming up in Java 19?
0:35 - What are virtual threads and structured concurrency?
2:12 - Virtual Threads in Java 19 - why and how?
4:31 - Structured Concurrency in Java 19 - why and how?
6:54 - How to run the preview/incubator samples right now?
9:25 - Old thread model vs virtual threads performance
12:26 - Let's run one million parallel threads
13:26 - Examples of Structured Concurrency, what does parallelism control mean?

Links in the video (Thanks for Rémi Forax for the cool samples!):
https://github.com/forax/loom-fiber/
https://download.java.net/java/early_...
https://social.ora.cl/6010Mpdz6
https://social.ora.cl/6015Mpdz1
https://social.ora.cl/6018Mpdzy
https://social.ora.cl/6010MpdzK