Java ExecutorService - Part 1 - Introduction

  Рет қаралды 423,179

Defog Tech

Defog Tech

Күн бұрын

Пікірлер: 291
@fazilkhan6779
@fazilkhan6779 Жыл бұрын
This executor service series is one of the best ever educational KZbin series ever. Thanks a ton. Your explanation is awesome.
@mostinho7
@mostinho7 4 жыл бұрын
Done thanks Thread pool instead of creating a 1000 threads which is expensive, can make a fixed size pool and submit 1000 tasks to it. 3:40 how it works internally 5:30 ideal pool size for cpu task is number of cores 9:30 thread pool size for io intensive tasks
@ramcorp542
@ramcorp542 4 жыл бұрын
Thank you, you have a skill for explaining complex concepts in a clear concise manner. I would love to see full fledged courses created by you.
@AyushSharma-ux4fk
@AyushSharma-ux4fk 3 жыл бұрын
A very intelligent statement. If your tasks are I/O intensive e.g. DB calls, Network calls. Most of the threads would be in waiting state (waiting for DB response or Network call response) in such a scenario having a large thread pool is the right way to go. That way you would be able to start more tasks. Thanks
@yathiraju1000
@yathiraju1000 5 жыл бұрын
Guys please share his videos in other groups. we have to support this kind of content and it will be very useful to people who are looking for good content
@amritasahoo6773
@amritasahoo6773 6 жыл бұрын
Really explained well. This is the best I have found till now. Thank you. Keep up the good work :)
@DefogTech
@DefogTech 6 жыл бұрын
Thank you for the kind words!!
@yathiraju1000
@yathiraju1000 5 жыл бұрын
Yes this guy is awesome in subject and the way he is describing the concepts are speechless . I heard few concepts and all are above the notch.
@orangefield2308
@orangefield2308 Жыл бұрын
best work ever, please make more videos !! I understand executorService finally
@MrSN99
@MrSN99 7 ай бұрын
as i'm kotlin dev i just skipped this completely. But you explaining this made some things clearer. I didn't expect this.
@shivshaktipandey7148
@shivshaktipandey7148 Жыл бұрын
explaining with how , why , what , when -------------- everything about the topic -------- hats off ----------- u will complete 100k soon bro
@ankitnavalakha508
@ankitnavalakha508 5 жыл бұрын
There are so many videos for multithreading available in KZbin but I found you best because of your diagram presentation which is unique. You explained very well. You are awesome and continue with this key feature.
@sharatchandra9198
@sharatchandra9198 3 жыл бұрын
I have read so many places, everything is of no use, you are brilliant.
@manish436
@manish436 2 жыл бұрын
Really great explanation, adding one formula for I/O intensive task, according to "Java Concurrency in Practice" Number of threads = Number of Available Cores * (1 + Wait time / Service time)
@divyamahesh9032
@divyamahesh9032 10 ай бұрын
You know while I start the interview preparation I'm watching all these videos saved , and this is my 3rd time watching it while I'm moving out of my 2nd company....🎉🎉 Thanks for your great work .
@DefogTech
@DefogTech 9 ай бұрын
That's so heartening to hear! Thank you for the kind words. Good luck for the new job. Wish you great success there as well.
@contactdi8426
@contactdi8426 2 жыл бұрын
Holy Moli buddy!!! This was spot on! The BEST on the internet, cleared all my doubts right from basics to advance.. Super Thanks, I really appreciate great people like you that helps the community.
@highlightsportz
@highlightsportz 2 жыл бұрын
I as individual surf youtube a lot for learning purpose and almost have watched most of the youtuber on internet, But this channel is at another level in terms of quality . Thanks a lot sir . It would be great if you could take out some time and nail the microservice buzz words
@edeepakjain
@edeepakjain 5 жыл бұрын
Best video... Finally someone explained thread pool size derivation
@nilesh6429
@nilesh6429 6 жыл бұрын
ThreadPoolSize tread off with CPU core concept is excellent. You have cleared all doubts about the size of the pool. Thank you.
@DefogTech
@DefogTech 6 жыл бұрын
You're welcome! I'm happy it helped
@catlord69
@catlord69 4 жыл бұрын
What the hell, you explain so well and clearly ! Amazing
@odilhonislomov8954
@odilhonislomov8954 2 жыл бұрын
THANK YOU !!! A LOT OF THANKS. There is no better explanation than yours. You are the best. Keep going
@siteshkulkarni5924
@siteshkulkarni5924 2 жыл бұрын
Hi Deepak, I just watched all your 4 videos related to ExecutorService, you have shown how things can be explained in a super simple way yet powerful. Great job!! thanks.
@sakship1558
@sakship1558 2 жыл бұрын
Bestest explanation seen on Internet, thank you so much.
@rishinjiya42
@rishinjiya42 4 жыл бұрын
The best combination of content and explanation. I wish Deepak had videos and courses on everything I need as a Java/Spring developer
@pepperjack6749
@pepperjack6749 6 жыл бұрын
Most concise and clear executor service description I’ve seen. Thank you!
@DefogTech
@DefogTech 6 жыл бұрын
You're welcome!
@ruchigarg7788
@ruchigarg7788 3 жыл бұрын
Really, so easily explained these concepts with how to implement. Superb. Should create a playlist of java 8.
@raidtheferry
@raidtheferry 8 ай бұрын
Very high quality explanation and accompanying slideshow. I appreciate you making this video
@harikavolam7123
@harikavolam7123 3 жыл бұрын
Thanks for explaining in both code and internal visualization of threads. Great explanation. You have explained complicated topic in very simple way.. Thanks a lot
@mehulsolanki9435
@mehulsolanki9435 Жыл бұрын
Clear and concise. As simple as it can get. Keep up the good work!
@AshishBurnwal
@AshishBurnwal 6 жыл бұрын
This is the best tutorial I have ever seen for executor framework. Thanks a lot
@DefogTech
@DefogTech 6 жыл бұрын
Thank you sir!
@kitkarson4226
@kitkarson4226 3 жыл бұрын
Man .. god bless you!! Thanks!! you explain complex topics in a way anyone can understand.
@philipmartinelli6994
@philipmartinelli6994 2 жыл бұрын
Awesome use of visualizations. This is really helpful, thank you!
@abzzz4u
@abzzz4u 4 жыл бұрын
All answers in one video ....keep them coming bro
@pratiklohar4566
@pratiklohar4566 4 жыл бұрын
This the best explanation on executor service I have found so far . Thank you so much. Expecting more such videos from you !
@manishmanghwani731
@manishmanghwani731 3 жыл бұрын
That's not gonna happen anytime soon :(
@divyanshpatel1301
@divyanshpatel1301 Жыл бұрын
All the concepts u given is aksed in an interview, best explanation ❤
@parambharti7095
@parambharti7095 3 жыл бұрын
Extremely awesome. Please keep making videos like this.
@gobindarora007
@gobindarora007 5 жыл бұрын
Cleared all my doubts. Thanks for this amazing video. Keep doing the great work.
@priyanka0112
@priyanka0112 3 жыл бұрын
Awesome explanation. This is the best i have seen so far. Looking forward to watch all your videos.
@manishghoshi3861
@manishghoshi3861 3 жыл бұрын
The best till now. Thanks.
@786PrvN
@786PrvN 6 жыл бұрын
Very much simplified and same effective as well. +1 :)
@br4676
@br4676 4 жыл бұрын
Thanks sir , this is the best video I have seen so far on this topic
@thebibhuty
@thebibhuty 5 жыл бұрын
Just one suggestion, always give a link to working code, you explain well, the only thing I think missing is a link to a working code
@jamshadm
@jamshadm 3 жыл бұрын
I didnt understand why there are 49 dislikes for this video? He explained very well..
@mattmilzewski1062
@mattmilzewski1062 4 жыл бұрын
Explained excellently you are an absolute legend
@clswar00p
@clswar00p 3 жыл бұрын
Pleasant voice while explaning.Very clear
@rj7560
@rj7560 4 жыл бұрын
Big fan of you. Please more videos... Thank you very much.. much appreciated
@vkalaivanan
@vkalaivanan 4 жыл бұрын
Concepts are clear and simple to understand. Thank you :)
@sanjeevanemani6720
@sanjeevanemani6720 4 жыл бұрын
maan.....where u been all these days? Glad to find ur channel. Please make more videos.
@muruganvellaichamy709
@muruganvellaichamy709 5 жыл бұрын
Very well explained. Thanks for this. :)
@shikharchoudhary7639
@shikharchoudhary7639 5 жыл бұрын
Your visualization techniques are phenomenal.
@RohitPal-lz1wf
@RohitPal-lz1wf 3 жыл бұрын
Very well structured and explained perfectly. I would love to see the tutorial during my free time
@sonyroy45
@sonyroy45 3 жыл бұрын
You are awesome, please don't stop posting such videos 🙏
@vijaynandwana4289
@vijaynandwana4289 5 жыл бұрын
You are awesome, thank you for posting these videos.
@RamKumar-dm6es
@RamKumar-dm6es Жыл бұрын
Thank You Deepak bhaiya for explaing this concept so beautifully
@utkalkesharisahu3014
@utkalkesharisahu3014 2 жыл бұрын
You should post more bro. You really explain complicated topics in a really simple manner.
@rishipollai5646
@rishipollai5646 3 жыл бұрын
Lots of love and support 💖 .. one of the best explanation
@jaleelpasha3301
@jaleelpasha3301 9 ай бұрын
Introduction: - The video discusses the concept of thread pools and the Java `ExecutorService`. - It explains how to efficiently manage tasks using a fixed number of threads. Key Points: - In Java, running tasks asynchronously is straightforward using threads. - Tasks can be executed synchronously by creating a class that implements `Runnable` and overriding the `run` method. - A new thread can be created with an instance of this class and started. - To run multiple tasks, one could use a loop to create and start new threads for each task. - However, creating too many threads can be inefficient as each thread corresponds to an operating system thread. - To address this, a thread pool can be used to manage a fixed number of threads. - Tasks can then be submitted to the thread pool, and the threads in the pool pick up and execute these tasks. - Using a thread pool reduces the overhead of creating and managing threads, improving performance. - The ideal pool size depends on factors like CPU-intensive or IO-intensive tasks. - For CPU-intensive tasks, the ideal pool size is the number of CPU cores. - For IO-intensive tasks, a larger pool size may be beneficial to handle waiting states effectively. Conclusion: - Choosing the right pool size for thread pools is crucial for optimal performance. - Understanding the nature of tasks helps determine the appropriate pool size. - Java provides the `ExecutorService` interface for managing thread pools, offering flexibility and efficiency in task execution.
@sekharsoftware
@sekharsoftware 5 жыл бұрын
Really precise to the point and very useful. You should do a podcast.
@shubhamjain2810
@shubhamjain2810 4 жыл бұрын
Your way of explaining the topics are really good. I am having one question. It might be stupid one,but I wants to know How to handle the Atomicity for write and Read operation in Such case. Pool size is of 20. t1 to t20 are doing write operation. ---> They will be in waiting state t21 to t30 are doing Read operation. ---> In between any of this thread comes in and start reading and get response before completion of write operation of all 20 threads . It may get old data.
@learnlearn8230
@learnlearn8230 4 жыл бұрын
Thanks a lot, very well explained .I feel one of the best video so far compare others on youtube
@flywithashutosh4772
@flywithashutosh4772 5 жыл бұрын
Why so less subscriber to such a beautiful channel , great work dude keep it up.
@DefogTech
@DefogTech 5 жыл бұрын
Thanks buddy!
@dvoulio
@dvoulio 4 жыл бұрын
Guys.... the absolutely most crystal clear explanation of Thread Pools I have ever heard. Beautifully sparse, no-noise or arm waving... well-presented and recorded. Bravo... I have become a great fan and are convincing others as well !! One small request... what is the cursor enhancing software you are using in the presentation ???
@DefogTech
@DefogTech 4 жыл бұрын
It's pointer function in Google Slides. Thank you so much for the kind words BTW! Means a lot to me
@derrick3534
@derrick3534 6 жыл бұрын
Wow way better than the Udemy tutorial on Executors. You should expand on this and make a Udemy tutorial. Great teaching skills.
@DefogTech
@DefogTech 6 жыл бұрын
Thank you! My long term plan is to create my own site like egghead.io , let's see how that goes.
@mikeprice7942
@mikeprice7942 6 жыл бұрын
You explain this topic very well! Appreciate the visualization!
@raghavendradake2057
@raghavendradake2057 5 жыл бұрын
Crisp and clear explanation ... Amazing work 👍
@rpkm85
@rpkm85 6 жыл бұрын
Very neatly explained... good work bro.. 👍🏻👍🏻
@GanaviN-f1o
@GanaviN-f1o 4 ай бұрын
you explained this so clearly.....thanks for this !
@SchkuenteQoostewin
@SchkuenteQoostewin 5 жыл бұрын
Could you please teach the rest of India how to speak English. You are the poster child of clear flunet English. Your pitch and clarity in the words are masterful. Also your knowledge is strong, I love the tutorial and I am as American as corn.
@prakriti-ke-sath
@prakriti-ke-sath 5 жыл бұрын
Loved the way you explained , it was neat and clear , thank you very much.
@sathishspeaks
@sathishspeaks 2 жыл бұрын
Defog come back and do more videos you are the best in explaining complex concepts buddy
@hemanthsavithala4081
@hemanthsavithala4081 5 жыл бұрын
Awesome video... Thanks for your efforts & all
@kogilathotavijayreddy4963
@kogilathotavijayreddy4963 2 жыл бұрын
Defog Tech! You live upto your name
@sametbaskc3768
@sametbaskc3768 Жыл бұрын
Thanks for this clear explanation. You are doing a great job. I just wonder what is the strategy you follow to learn the concepts in crystal clear? Could you also share the resources (book, articles, docs) you follow when you were learning this topics?
@FalconMinds
@FalconMinds 2 жыл бұрын
Awesome explanation.. love your work brother
@aakashjain3498
@aakashjain3498 4 жыл бұрын
Wow. Hats off for that explanation.
@aditchauhan876
@aditchauhan876 5 жыл бұрын
Godly explanation
@raghavmanchanda4736
@raghavmanchanda4736 Жыл бұрын
Best explanation ever, thanks for it😇😇
@jyoshnaroy7205
@jyoshnaroy7205 4 жыл бұрын
Outstanding explanation and thanks a lot. Life saver.
@ladnsathukorala
@ladnsathukorala 2 жыл бұрын
Excellent Explanation 👍
@kamleshpar9847
@kamleshpar9847 4 жыл бұрын
Very well explained , pl continue your excellent work
@marshalkiruba
@marshalkiruba 4 жыл бұрын
Loved the explanation. Just a lame question. For a CPU intense operation, shouldn't the ideal thread pool size be (no of cores-1) as there is already a main thread running?
@rizwansayyed7893
@rizwansayyed7893 3 жыл бұрын
i really would like to know this
@HussainMohammedAshruf
@HussainMohammedAshruf 3 жыл бұрын
@@rizwansayyed7893 main thread dies soon, before other threads!
@rizwansayyed7893
@rizwansayyed7893 3 жыл бұрын
@@HussainMohammedAshruf i don't understand does main thread count in cpu runtime cores available
@princelowienalasa8776
@princelowienalasa8776 5 жыл бұрын
How I wish to add the new Java 8's newWorkStealingPools() method Thanks :)
@milankushwah8580
@milankushwah8580 8 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 *Running tasks asynchronously in Java traditionally involves creating new threads manually.* 02:30 *Utilizing a thread pool with a fixed number of threads is more efficient than creating threads dynamically, especially for large numbers of tasks.* 04:32 *The ideal pool size depends on the nature of tasks; for CPU-intensive tasks, match the pool size to the number of CPU cores, while for IO-intensive tasks, a larger pool may be beneficial.* 08:44 *Considerations for CPU availability in multi-tasking environments and balancing thread pool size based on task submission rate and IO operation wait times are crucial for optimizing performance.*
@digvijaynalawade9207
@digvijaynalawade9207 2 жыл бұрын
Explained very nicely 👌
@vishlaldolare9557
@vishlaldolare9557 5 жыл бұрын
Awesome explanation today i actually understand thread
@sharatchandra9198
@sharatchandra9198 3 жыл бұрын
extra extra ordinary.
@prateekgupta8861
@prateekgupta8861 3 жыл бұрын
Very very well explained. Thanks.
@harikrishnathariboyina6005
@harikrishnathariboyina6005 6 жыл бұрын
Thank you for such a nice explanation. it's very clear and simple ..
@drakezen
@drakezen 6 жыл бұрын
Great explanation. Looking forward to more videos.
@DefogTech
@DefogTech 6 жыл бұрын
Thank you! Working on a few, will upload in couple of days.
@Maddy-jn5pk
@Maddy-jn5pk 7 ай бұрын
Thank you, amazing explanation!
@rajeshg3570
@rajeshg3570 2 жыл бұрын
awesome explanation .. really like it
@sampratikatariya5928
@sampratikatariya5928 Жыл бұрын
Explained very well!!
@CodeNCode-rm8ci
@CodeNCode-rm8ci 3 жыл бұрын
Very good explanation.
@deepamgupta8011
@deepamgupta8011 4 жыл бұрын
Clear cut explanation!
@shekhar_2014
@shekhar_2014 3 жыл бұрын
I must tell you , your explanation on all topics are very clear and easily understandable. Thank you somuch for the vdos .. :) .. Can you please upload a vdo on React Js , If posible.
@viveksingh-rt4py
@viveksingh-rt4py 7 ай бұрын
Thanks a ton for sharing the video. Clear and concise explanation. May I ask you one question. Say If I have multi core processor and I have initialised ExecutorService with pool size as 100, all my task are IO intensive. Scheduler will make use of all core and will execute threads on different core. Is my understanding right.
@smarttrupti2007
@smarttrupti2007 2 жыл бұрын
Beautiful explanation
@ahmedkhan8352
@ahmedkhan8352 9 ай бұрын
I watched many videos, but your video is the best till now I have watched. Can you please make videos on "Fork Join" as well ?
@roshankarwalkar7102
@roshankarwalkar7102 3 жыл бұрын
Really explained well. Keep it up bro.
@rsousaj
@rsousaj 3 жыл бұрын
Very well explained! Thanks
@SonuKhan-mp2yn
@SonuKhan-mp2yn 3 жыл бұрын
Legendary, Thank You Sir..
@ranvaknin9669
@ranvaknin9669 4 жыл бұрын
fantastic video. really well done, super clear!
@tarunkundhiya5196
@tarunkundhiya5196 6 жыл бұрын
Thanks for the wonderful explanation.
Java ExecutorService - Part 2 - Type of Pools
8:02
Defog Tech
Рет қаралды 204 М.
Java ExecutorService - Part 4 - Callable / Future
13:08
Defog Tech
Рет қаралды 183 М.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 11 МЛН
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 17 МЛН
Why thread pools even exist? and how to implement them?
9:29
Arpit Bhayani
Рет қаралды 40 М.
Thread Pools in Java
18:04
Jakob Jenkov
Рет қаралды 70 М.
Java ExecutorService - Part 3 - Constructor & LifeCycle methods
13:12
Introduction to CompletableFuture in Java 8
19:34
Defog Tech
Рет қаралды 329 М.
Java Concurrency Interview - What is an Ideal Threadpool size?
13:44
Java ExecutorService - Part 1
20:56
Jakob Jenkov
Рет қаралды 56 М.
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 966 М.
34. Thread Pools in Java | ThreadPoolExecutor Framework | Multithreading Part6
1:16:55
Concept && Coding - by Shrayansh
Рет қаралды 45 М.