Тёмный

Java 21 Virtual Threads | Scale your threads optimally 

DevXplaining
Подписаться 4,4 тыс.
Просмотров 472
50% 1

In this video, I'll go through one of the major features of Java 21 - the virtual threads model. Virtual Threads allow thread-using applications to scale with much better resource utilization, thus we achieve better scaling and faster speeds when the hardware allows it. Another cool thing is that any changes to your existing code would be minimal.
So join me for a bit, I'll introduce this topic for you, and show some demonstrations of the capability here. If you are left with questions or comments, use the comment section below, and I always appreciate it if you click the like button if you like the video. Also feel free to share the link to the video, or subscribe to my channel for more stuff like this.
Here's the link to the actual specification (read for a bit more in-depth details if you got curious) and a few more Java 21 related videos:
openjdk.org/je...
• Java 21 New Features |... (All Java 21 new features)
• Java 21 Hello World | ... (Java 21 Hello World)
• Java 21 String Templat... (Java 21 String Templates)

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 3   
@Chrisbees
@Chrisbees 7 месяцев назад
Very interesting sample of Virtual threads. How does this integrate when youre building an application with a framework? Dont the framework handle the creation of threads?
@DevXplaining
@DevXplaining 7 месяцев назад
Yes, a good question. Short answer is that yes, typically that's what happens, and typical software project inside any web framework pretty much ignores you needing to tap into parallelism - you just think about it when accessing background resources. But two reasons to still keep up with Java parallelism features: 1) Well sometimes you do build something from scratch, that would mainly happen if you want to do some intensive calculations without web servers, or if you are building a server. 2) Virtual Threads are currently finding their way into popular servers and frameworks, so mostly you can just enjoy the benefits, but it's at least good to get the idea why they may bring more performance when your favorite framework start using them. So mostly I think this is the message that Java platform is still very much alive and kicking, and still getting better. Spring Framework is already embracing them, for example: spring.io/blog/2022/10/11/embracing-virtual-threads Might be a fun topic for a future video.
@Chrisbees
@Chrisbees 7 месяцев назад
okay great. Maybe you might consider making a video in the future for this question or you could please share your ideas here. I'm a bit confused if Virtual Threads are going to replace Reactive Programming. If they would, why? and if they won't, why?@@DevXplaining
Далее
Virtual Threads in Java 21
17:22
Просмотров 4,9 тыс.
Java 21 new feature: Virtual Threads #RoadTo21
33:35
Просмотров 65 тыс.
Loom - Where Are We? #JVMLS
46:26
Просмотров 7 тыс.
Structured Concurrency in Java 21
14:52
Просмотров 1,7 тыс.