JDK 19 | Java Virtual Threads | Detailed Explanation With Example | JavaTechie

preview_player
Показать описание
The concept of “Virtual threads” has gained considerable attention in recent times. Many programming languages are updating their thread libraries to support the Virtual Threading feature. Java introduces the virtual thread as a preview feature in the Java 19 release. This tutorial provides a deep introduction to the thread from the basic to the in-depth level of it in order to express the benefit of virtual threads, and the advantages they offer compared to conventional thread creation methods.

#JavaTechie #JDK19 #VirtualThread

Spring boot microservice Premium course lunched with 70% off 🚀 🚀

Hurry-up & Register today itself!

PROMO CODE : JAVATECHIE50

GitHub:

Blogs:

Facebook:

Join this channel to get access to perks:

guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie

Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community ,
you are free to use source code from above mentioned GitHub account
Рекомендации по теме
Комментарии
Автор

I love the Java Community Process and what it's doing to improve the Java language!

francksgenlecroyant
Автор

Thanks, Basant, for new future on Java 19 Virtual Thread architecture Appreciate your efforts.

gopisambasivarao
Автор

Great Explanation sir, Jai Jagannath, May god bless you with good health.

kumarabhishek
Автор

Thanks for your videos. It helps a lot❤. If possible, try making a video or series on new features from JDK9 or JDK 11.

arjun-fleh
Автор

Nice explaination man but one question, about last 3 mins of your video, Where you are creating virtual threads and platform thread & starting it.
My question is, When you will start virtual thread then will it get map to platform thread ? If so then why directly mapping to platform thread is more time consuming ?

nirajosh
Автор

Queries:
1. Why is CPU utilisation calculated as 16%? Can you explain that, why’re we taking it as a pct of 1sec. Is CPU blocked for whole 1 sec?
2. While showcasing whether virtual thread will release PT when blocked, you’re printing details for first VT only, sleeping for all 10. Why not just create 1 VT, and test?

divyanshusingh
Автор

Great summarization of virtual threads. Can't wait any more for the upcoming videos on the same.

Appreciate all your efforts in publishing this awesome content

Many Thanks 😊

manikantareddy
Автор

Hi @Basant Sir ،
Kindly plan a multi threading programing playlist as there is no such proper playlist with real time use cases available on YouTube.

sajid.farooqi
Автор

How many threads do you get per each spring boot tomcat server? How do you change this setting?

subba
Автор

I have a confusion in your "high level benchmarking" around 11th min, of video.. Does No. of threads primarily depend on RAM side...I believe CPU CORE is the most prime factor to consider number of threads supported for a h/w system. Suppose you have 4 core CPU, i believe as per guidelines, we may have 4-5 threads at a time...Please share me more input in this regards.

vivekmit
Автор

is it like event loop implementation in other programming languages ? Thank You !!

hackwithharsha
Автор

Will you be able to upload this PPT or documentation in github?? Or in the README file??

sivannarayanapenumala
Автор

Mega Star (Basant): Thank you for this information. I have a doubt. As virtual threads are residing in heap memory. if we increase the count of virtual threads then heap memory increases which leads to JVM performance issues. So what is the secret/logic/magic exists without having JVM performance issues . can you pls tell me in brief ?

raghuvardhansaripalli
Автор

How many default virtual threads can be there ? Any specific limit ?

rupeshpatil
Автор

What is the usage of threads in our applications😊

omit_krish
Автор

In the world of cloud era, how best is this virtual thread impact? Can you summarize the benefits in view of cloud comparison..

sureshmanne
Автор

IntStream.range(0, totalThread)
.mapToObj(
thCount -> -> {
// out.println("Virtual thread "+ thCount);
})).toList();

without print statement:
millis used to launch 10000 vthreads: 41ms
millis used to launch 10000 pthreads: 735ms

With print statement:

millis used to launch 10000 vthreads: 1865ms
millis used to launch 10000 pthreads: 813ms

when print statement is there, the virtual thread took more time when compared to the platform thread. can you please explain why>

hanumanthram
Автор

What happens to Thread Local ? Will the Virtual thread carry it?

amithdk
Автор

Total CPU time for single request = 0.1 (Request) + (0.1 Response) = 0.2 ms ??. Why was the IO (DB and other services ) 100 ms was omitted from Total CPU time for single request calculation ??
Am i missing anything basanth?

shaikakbarali
Автор

To address the issue of thread per request, wbclient is also there then why virtual thread?

J-uf