Virtual Threads and Structured Concurrency in Java 21 With Loom

Virtual Threads and Structured Concurrency in Java 21 With Loom

IntelliJ IDEA, a JetBrains IDE

1 год назад

29,375 Просмотров

Loom brought 2 preview features in Java 19: virtual threads and structured concurrency. Virtual threads are a new model of thread that is compatible with the current platform threads but much lighter. You can easily launch millions of virtual threads on a machine that would only support a few thousand platform threads. Virtual threads should be made final in JDK 21. Structured concurrency leverages this feature to write asynchronous code in a very easy way. It is built on an imperative mono-thread programming model built on top of virtual threads. These elements have been updated in Java 20. Java 20 also has a third preview feature delivered by the Loom project: a new model for ThreadLocal variables called ScopedValues that is meant to work with virtual threads. This presentation shows you how this all works, the new pattern you will be able to use for your asynchronous systems, and the performance you may expect.

Speaker: José Paumard

Join us:
Website: https://jb.gg/website
Blog: https://jb.gg/blog
Twitter: https://twitter.com/intellijidea
Facebook: https://www.facebook.com/IntelliJIDEA/

Download IntelliJ IDEA: https://jb.gg/download-intellij-idea
Top 15 IntelliJ IDEA shortcuts: https://jb.gg/Top15IntelliJIDEAShortcuts

#concurrency #virtualthreads #concurrentprogramming

Тэги:

#java #intellij #loom #jdk #webinar
Ссылки и html тэги не поддерживаются


Комментарии:

@arvindmannem8751
@arvindmannem8751 - 09.12.2023 19:23

This reminds me of generator functions in Python; great explanation

Ответить
@12005914
@12005914 - 23.09.2023 17:37

Can you share the link from GitHub with codes you exemplify in the live?

Ответить
@user-fg6ng7ej6w
@user-fg6ng7ej6w - 22.09.2023 14:37

good detailed presentation, thanks. internals, guts of the things are especially interesting

Ответить
@traxex1975
@traxex1975 - 10.09.2023 12:40

Great video! 🎉
Truly professor explanation😊

Ответить
@user-dn8nm9ie2y
@user-dn8nm9ie2y - 10.09.2023 00:44

This guy is awesome. I like the way he easily explains difficult concepts. @Jose is s a Lengend!

Ответить
@milesliu4498
@milesliu4498 - 01.09.2023 18:08

Awesome LTS version

Ответить
@shakilahmed4647
@shakilahmed4647 - 23.07.2023 09:06

@Mala you wanted to attach his GitHub link btw

Ответить
@bearbear4893
@bearbear4893 - 07.06.2023 02:53

Nice. Thx for the video and your contribution to the community

Ответить
@onebeartoe
@onebeartoe - 01.06.2023 22:16

This was a great format! I wish I had watch it live.

Ответить
@jfilipcic
@jfilipcic - 29.05.2023 08:47

One more question, if possible. How will virtual thread deal with happens before guarantee? Since context switching will be so much faster, will the compiler need to rearrange code, creating visibility issues?

Ответить
@bharatnanwani
@bharatnanwani - 27.05.2023 08:16

Amazing session!

Ответить
@kanaillaurent526
@kanaillaurent526 - 26.05.2023 16:34

Révolution!!!!

Ответить
@user-pi9cj2or5n
@user-pi9cj2or5n - 26.05.2023 16:12

Awesome feature!

Ответить
@krellin
@krellin - 26.05.2023 14:55

This is in many ways inferior to coroutines in kotlin
but still a huge step for java, nice job.

Ответить