Java Concurrency and Multithreading - Introduction

Ғылым және технология

This video gives you a conceptual introduction to Java Concurrency and Multithreading. This Java Concurrency and Multithreading introduction is at a conceptual level, so it does not contain code examples. For videos and texts with code examples, checkout the links below:
Twitter: @jjenkov
LinkedIn: / jakob-jenkov-4a3a8
Java Concurrency playlist:
• Java Concurrency and M...
Java Concurrency tutorial (text):
tutorials.jenkov.com/java-conc...
Java Concurrency Utility tutorial (text):
tutorials.jenkov.com/java-util...

Пікірлер: 200

  • @karaczan5839
    @karaczan58394 ай бұрын

    0% yapping 0% wasting time 0% advertising 100% pure knowledge absolute chad

  • @JakobJenkov

    @JakobJenkov

    4 ай бұрын

    Thank you very much for your kind words ! :-)

  • @abishekraju4521
    @abishekraju452126 күн бұрын

    This was the exact kind of explanation I was looking for. Thank god someone thought all this was worth explaining conceptually. You have my gratitude Mr. Jenkov!

  • @JakobJenkov

    @JakobJenkov

    25 күн бұрын

    You are welcome 😊

  • @shubhamagarwal1434
    @shubhamagarwal14342 ай бұрын

    God of Concurency..i have bene flowing you since my 2014 when you used to write blog post only...by going through your post i attend interview like a LION when they ask mutithreading qns..Thanks a Lot form 10+ yrs exp guy from BLR,India..

  • @JakobJenkov

    @JakobJenkov

    2 ай бұрын

    I am happy that my tutorials were helpful to you over the years!! :-)

  • @abhaythakur8572
    @abhaythakur85723 жыл бұрын

    read your blogs few months ago, today found your youtube channel what a awesome day . thanks for tutorials man

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome! :-)

  • @papatenterick8441
    @papatenterick8441Ай бұрын

    This playlist as well as whole channel is one of those treasures of youtube

  • @hamsterhaunter5718

    @hamsterhaunter5718

    Ай бұрын

    agreed

  • @JakobJenkov

    @JakobJenkov

    Ай бұрын

    Thanks a lot !! 😊

  • @priyankawagh5217
    @priyankawagh521714 күн бұрын

    I have been following your blog since 2019 and till a day everytime I need brushup, your blog is my lifesaver! The way you have designed your blog is something extremely unique I have seen and even viewing the title of JENKOV takes my fear of multithreading away 🤗 Last time I had cracked crazy multithreading interviews in India & Canada based on your guidance and now this year I am working on hit USA job market! 😃 Kudos to your work!!! keep it up 👍

  • @JakobJenkov

    @JakobJenkov

    13 күн бұрын

    Thank you very much for your kind comment ! :-) I am happy that my tutorials - and now videos - have been helpful for you :-) ... and good luck in the US !! :-) I am trying to keep up the work, but it takes a lot of time to make the videos and tutorials to a high enough quality. But I get some new material out continuously :-)

  • @andrewkang6200
    @andrewkang62006 ай бұрын

    Thank you for creating this educational video. I highly appreciate how detailed and interesting you explained the material. This is the best I've seen in this field. Thank you for your effort and time you've dedicated to creating this video

  • @JakobJenkov

    @JakobJenkov

    6 ай бұрын

    Thank you very much for your kind words ! :-)

  • @subinos
    @subinos7 күн бұрын

    Thank you so much for creating such wonderful video. Explained very well, thorough and detailed God Level !!!. Best video series I have ever watched on multithreading topic

  • @JakobJenkov

    @JakobJenkov

    7 күн бұрын

    Thank you very much! :-) ... I am happy the video series is helpful! :-)

  • @kfg645
    @kfg6453 ай бұрын

    This is academically rigorous, industrially competitive and very helptul tutorial

  • @JakobJenkov

    @JakobJenkov

    3 ай бұрын

    Thank you very much !! 😊😊😊

  • @boltez6507
    @boltez65072 ай бұрын

    Thanks,best intro video i have found so far,and is more exhaustive than most sources. And the overall format of you video is so good,thanks.

  • @JakobJenkov

    @JakobJenkov

    2 ай бұрын

    Than you very much !! 😊😊😊

  • @vaibhav4973
    @vaibhav49733 жыл бұрын

    Love your concept explanation :) I hope you will continue to help us like this. Thanks

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks ! :-) ... I have planned a good list of videos more - on Java Concurrency.

  • @genhub9288
    @genhub92883 жыл бұрын

    After many yrs working in Java I changed to Scala 7 yr ago but I think that every Scala dev should knows these contents and then start with the Futures and so on. great videos . :)

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    I do too. Actually, all these small details is why I stayed with Java and not switched to Scala or Kotlin. I feel like I have greater control in Java over performance sensitive stuff.

  • @VikramSingh-wy5mn
    @VikramSingh-wy5mn3 ай бұрын

    Thanks Jakob for such a nice explanation.

  • @mostinho7
    @mostinho73 жыл бұрын

    Done thanks! Concurrency vs parallelism OS context switching vs actually running tasks on different cores

  • @dhananjaychoudhary7836
    @dhananjaychoudhary78364 ай бұрын

    Thanks Jakob for this video, it cleared my concurrency visualisation and dots are better connected now. Onto the next dot now. Stay Awesome!

  • @JakobJenkov

    @JakobJenkov

    4 ай бұрын

    You are welcome! :-)

  • @hesona9759
    @hesona975910 ай бұрын

    I can't understand exactly the concept of Concurrency and Multithreading for a year. Luckily, I saw your video. Thank you so much

  • @JakobJenkov

    @JakobJenkov

    10 ай бұрын

    Great! Glad it helped ! :-)

  • @Rohitbhole1
    @Rohitbhole12 жыл бұрын

    Thank you so much for making this gold content available. God bless you!

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    You are welcome :-)

  • @ericfricke4512
    @ericfricke45123 жыл бұрын

    Great teaching skills! Clear, concise, and engaging :)

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks a lot ! :-)

  • @hstanciu
    @hstanciu3 жыл бұрын

    Undeserved small number of views. Your videos are excellent! Thx.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks :-) ... I am quite happy with the number of views so far :-) Yes, it's not like some of those big channels, but I am also not doing KZread as a job - just as a hobby. I like playing with new media and tech, and KZread keeps evolving, so it's interesting to be here just to see what it can do.

  • @abhishekanand3842
    @abhishekanand38423 жыл бұрын

    Wonderful videos..clear explanations of complex topics. Helped me a lot in clearing my basic concepts

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Great to hear! :-)

  • @sharipovsunnatillo2772
    @sharipovsunnatillo27728 ай бұрын

    This is the best tutorial I have ever seen about multithreading and a far better any udemy courses. Thanks a lot bro!

  • @JakobJenkov

    @JakobJenkov

    7 ай бұрын

    You are welcome ! ... and thank you for your praise ! :-)

  • @user-em8ns3nw7n
    @user-em8ns3nw7n3 жыл бұрын

    Awesome! Your tutorials are extremely useful and easy to understand! Thank you very much.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are most welcome!

  • @oleksii_shtanko
    @oleksii_shtanko3 жыл бұрын

    Thank you so much for your video. It was easy to understand your explanation. Good job!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Great ! - glad it was helpful!

  • @romanburenko7593
    @romanburenko75932 жыл бұрын

    Awesome tutorial ! The best one I've seen !

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thank you very much! :-)

  • @FABGIO1
    @FABGIO1 Жыл бұрын

    Hi Jakob! Your competence on java concurrency is so deep and valuable that you could definitely write a perfect book on the subject. I would really buy it in a snap😊

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thank you :-) ... There are definitely Java developers out there with a deeper understanding, such as Brian Goetz (author of Java Concurrency in Practice) and others ! I only supplement these experts - with perhaps a different way of presenting the same ideas :-)

  • @JerreMuesli

    @JerreMuesli

    10 ай бұрын

    Java Concurrency in Practice is definitely the bible. Unfortunately it's a bit older so the newer Java additions or virtual threads are not part of the book

  • @kurisuta1305
    @kurisuta1305 Жыл бұрын

    Amazing video! Thanks for explaining! Its easy to understand.. Before, my mind cannot comprehend multithreading very well. But my brain understands your explanation. Thanks a lot, you are a very good teacher :)

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    You are welcome! ... I am happy my tutorials are helpful for you! ... and thank you for taking the time to tell me! :-)

  • @mithunkarthik5551
    @mithunkarthik5551 Жыл бұрын

    Great explanation, the best video I have ever seen for concurrency

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thank you ! :-)

  • @lool7922
    @lool79223 жыл бұрын

    What a wonderful explanation, big thanks 😊

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You're very welcome! :-)

  • @MohitKhare
    @MohitKhare Жыл бұрын

    thanks Jakob. wonderfully explained. you've got a new sub.❤

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Great ! Thanks ! :-)

  • @narendrayadav71
    @narendrayadav71Ай бұрын

    Bible of Java Concurrency !!! Thanks for the efforts !!!

  • @JakobJenkov

    @JakobJenkov

    Ай бұрын

    You are welcome! :-)

  • @garimadhanania1853
    @garimadhanania18533 ай бұрын

    Hands down the best free resource for learning Java concurrency!!

  • @JakobJenkov

    @JakobJenkov

    3 ай бұрын

    Thank you very much !! 😊 One more video coming out soon in the playlist !! 😊

  • @sair2917
    @sair29173 жыл бұрын

    Thanks Jakob! Just stopped by your video tutorials (have known your website since long time) and really like your video.. Looking forward to finish the entire playlist.. ✌😎👍

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks - next planned video is also going to be in this playlist :-)

  • @sair2917

    @sair2917

    3 жыл бұрын

    @@JakobJenkov can u please come up with concurrent collections video playlist.. Thanks again

  • @vsingh-26
    @vsingh-263 жыл бұрын

    You are amazing, what an explanation. Well done.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you very much for your kind words :-) I am glad my video helped you!

  • @maturiarun3267
    @maturiarun32679 ай бұрын

    Thank you sir I really appreciate it.After watching these videos ,it literally clarified my doubts a way better.😊

  • @JakobJenkov

    @JakobJenkov

    8 ай бұрын

    Great! Glad to hear it ! :-)

  • @fisnikmiftari9611
    @fisnikmiftari96113 жыл бұрын

    Thanks a lot, pretty decent explanation.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks :-)

  • @taoma9293
    @taoma92936 ай бұрын

    Great lesson ! 🤝

  • @JakobJenkov

    @JakobJenkov

    6 ай бұрын

    Thanks! 😃

  • @rahulchauhan-sg3yb
    @rahulchauhan-sg3yb4 жыл бұрын

    HiJakob, I am waiting for your other videos on concurrency i have watched your three videos. Your explanation and tutorial are very helpful.

  • @JakobJenkov

    @JakobJenkov

    4 жыл бұрын

    Great - I have more videos about Java Concurrency coming soon! :-)

  • @SoeaOu
    @SoeaOu3 жыл бұрын

    legend, thanks for putting this out

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome! :-)

  • @17a.studio
    @17a.studio3 жыл бұрын

    You're a lifesaver!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Great, thanks :-)

  • @suprecam9880
    @suprecam98803 жыл бұрын

    Awesome! Big help, thank you

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome - glad you liked it! :-)

  • @yaqinup
    @yaqinup3 жыл бұрын

    great explanation.. thank you !

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks! :-)

  • @huynhtrung6338
    @huynhtrung63382 жыл бұрын

    I love your contents very much!

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thank you - very much :-)

  • @cdgtopnp
    @cdgtopnp3 жыл бұрын

    I have been a fan since 2013. You are an incredible teacher and researcher. I like the diagrams in the video but I really wish there were a bit more visuals to keep the video interesting (a white board maybe). I hope you find the time to convert the tons of useful info you have on your website into more engrossing videos

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you very much! :-) ... yes, making videos "interesting" is harder than with text! I realize that sometimes it would be nice with nicer visuals, animations and even music etc. but it's hard to find a style where all the animations etc. do not become disturbing after a while!

  • @mayankpant5376

    @mayankpant5376

    Жыл бұрын

    ​@@JakobJenkov Try motion canvas or manima !!

  • @sangeeta338
    @sangeeta338 Жыл бұрын

    Amazing content and explanations !!!

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    I am happy you feel like that :-) ... it takes some energy to produce this content, so I am always happy when viewers get value out of it :-)

  • @pramodparmar445
    @pramodparmar445 Жыл бұрын

    Very good explanation :) Every Java Developer should watch it before writing yourself as a developer in Resume...!!

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thank you! :-) ... watch the whole playlist too! (see description below the video) :-)

  • @KiprutoR
    @KiprutoR3 жыл бұрын

    Best explanation of multithreading on the internet

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you very much ! Glad you liked it ! :-)

  • @KiprutoR

    @KiprutoR

    3 жыл бұрын

    @@JakobJenkov yeah, thank you. I now got a clear understanding only need abit of code to see how it's actually done. Also concepts like race conditions

  • @alessandroporfirio1910
    @alessandroporfirio19103 жыл бұрын

    Very good video, thank you!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Glad you liked it!

  • @chong9082
    @chong90823 жыл бұрын

    Great explanation!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks! Glad you liked it! :-)

  • @priyankjoshi3018
    @priyankjoshi30183 жыл бұрын

    Hi Jakob, nice one..keep it up and also have been visiting your website as well. Good Stuff.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thanks! :-) ... I will try keep it up :-)

  • @sreenathmca
    @sreenathmca4 жыл бұрын

    great explanation.

  • @JakobJenkov

    @JakobJenkov

    4 жыл бұрын

    Thanks :-)

  • @hamdamboyurunov6034
    @hamdamboyurunov60349 ай бұрын

    Really nice explanation and video

  • @JakobJenkov

    @JakobJenkov

    9 ай бұрын

    Thanks ! :-)

  • @uditmahajan555
    @uditmahajan5553 жыл бұрын

    Nice video. Thanks a bunch for it (:

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome ! Glad you liked it! :-) Did you watch the whole Java Concurrency playlist?

  • @alexandrprodan8794
    @alexandrprodan87942 жыл бұрын

    what a great tutorial!

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thank you :-)

  • @VishalSharma-lo5ol
    @VishalSharma-lo5ol4 жыл бұрын

    Very helpful, Thank u :)

  • @JakobJenkov

    @JakobJenkov

    4 жыл бұрын

    You are welcome :-)

  • @weaammohamed8992
    @weaammohamed8992 Жыл бұрын

    clear explanation. Thank you

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    You are welcome! :-)

  • @basudapalapur2969
    @basudapalapur29693 жыл бұрын

    Thanks!, Good content!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome! Great to hear! Thanks! :-)

  • @mouradlaraba
    @mouradlaraba3 жыл бұрын

    thanks a lot for your generosity sir :)

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome! :-)

  • @mukhtarbimurat5106
    @mukhtarbimurat5106 Жыл бұрын

    Great, thanks!

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    You are welcome :-)

  • @salahayman3513
    @salahayman35132 жыл бұрын

    one of best content really

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thank you! :-)

  • @aaryabhatia2478
    @aaryabhatia24783 жыл бұрын

    great lesson

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you :-)

  • @Das.Kleine.Krokodil
    @Das.Kleine.Krokodil Жыл бұрын

    Very good!

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thanks! :-)

  • @matus6681
    @matus66813 жыл бұрын

    Great video! Is there and easy way how to explain difference in Java vs Python threding module? As Python thanks to GIL is single threaded what does it mean in comparison to the Java? In other words what is possible to achieve with java that is not possible with python in terms of multithreding? Thanks!

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Hi Matus, I don't know Python well enough at this point to say what the difference between Java threads and Python threads are, unfortunately.

  • @tomok284
    @tomok284 Жыл бұрын

    Clear explanation

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thanks 😊

  • @lifesport1380
    @lifesport13802 жыл бұрын

    Great videos❤️

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thank you very much! :-)

  • @jay-rathod-01
    @jay-rathod-013 жыл бұрын

    Bro I just read all of your blogs on concurrency they are amazing but I had one general question: most of the topic are related to operating system subject and we use C language in Kernel while building OS then where are multithreading and concurrency in java used? in servers?

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Multithreading in Java is often used in e.g. Java web servers - but also in other types of server software (e.g. a game server) . Multithreading can also be used inside Java GUI applications, e.g. inside a JavaFX application.

  • @maywilliams82
    @maywilliams828 ай бұрын

    Your website seems down. Could you please look into it and bring it up? It is very helpful to get quick refresher and examples in Java concurrency and multithreading. This playlist is also a huge help. 🙏

  • @JakobJenkov

    @JakobJenkov

    8 ай бұрын

    My new web server was unstable - and might still be. I am currently experimenting a bit to find out what the problem is. Hopefully I find the problem sooner or later !

  • @Gohel95
    @Gohel953 жыл бұрын

    Thanks mannn❤️

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are welcome :-)

  • @andrewsoares8941
    @andrewsoares894110 ай бұрын

    At the end of the video you talked a little bit about "No shared mutable state concurrency", Is multi-processing one type of that?

  • @JakobJenkov

    @JakobJenkov

    9 ай бұрын

    I am not sure what the exact definition of "multi-processing" is.

  • @nandhakishore6548
    @nandhakishore6548 Жыл бұрын

    At line no 6:48 I have doubt. Even if some thread wants to read data from disk for that operation also we want cpu time and thread to read execute that reading operation right? Then what is the use of switching CPU to another thread ?

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    A file read is not executed by the CPU but by the hard disk and memory management hardware. While this is going on, the CPU is idle, waiting for the data to appear in memory.

  • @abdulmajeedghandy5407
    @abdulmajeedghandy54073 жыл бұрын

    you're really great thank u very much

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you very much ! :-)

  • @kruthiksai2372
    @kruthiksai23722 жыл бұрын

    Hi Jakob one small doubt is that as you mentioned when io operations is done on one thread the other thread can use the cpu . Does IO operations use cpu or not ? , if they use cpu how come other thread use the cpu or if it doesn't use cpu then where are io operations done .

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Down at the hardware level, IO operations typically use different hardware than the CPU. That is typically hardware such as the PCIe bus, SATA bus, the hard disk or network card, and then possibly the memory manager when data is copied from the network card or disk into memory (but I am not 100% sure about the last one). That means, that the CPU can be doing other things while the other hardware components serve the IO operations. Sometimes the CPU might be needed a bit for an IO operation down at the operating system level. For instance, it is the operating system that knows what type of file system you have on a harddisk. Thus, when you ask to load a file, the operating system need to translate that into IO operations on the disk. But during the disk IO operations the CPU can do something else.

  • @seriousskateboarding9938
    @seriousskateboarding99383 жыл бұрын

    I'm making an app on android. When I turn the power on, the main code stays on a loop (as I designed it to do). This allows my app to run in the background without the use of services & multithreading. The problem is when I try to open the already running app, it won't open because the main operation is still looping. 1. Any idea how I would solve this without force stopping? Do I need to put all my workload on a thread separate from the thread with my exit conditions? 2. Because the app is already running, it won't open the ui which is where my exit conditions are? I'm a newb. Please help me.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Oooh... you are stepping into the complex world of concurrency :-) ... Yes, the simplest thing for you would be to split the logic of your app into two threads. The main thread that controls the UI should not loop. It should not block. Yes, it's better to have a thread in the background which communicates with the UI thread. Your background thread can run in a loop which checks a BlockingQueue for new "messages" (objects) from the UI thread to which it should respond. If the background thread needs to do other things in its loop than process the messages from the UI thread, then the background thread should not "block" when checking for messages in the BlockingQueue. If no messages are found, it should continue through the rest of that iteration of loop, and then loop to the next iteration of the loop, where it again checks for new messages etc.

  • @anthonysouza-pl5pm
    @anthonysouza-pl5pm6 ай бұрын

    thats easy to undestand now let me check out how to code using concurrency

  • @JakobJenkov

    @JakobJenkov

    6 ай бұрын

    Thank you 😊

  • @tianyangren
    @tianyangren4 жыл бұрын

    Finally!

  • @JakobJenkov

    @JakobJenkov

    4 жыл бұрын

    Been waiting for Java Concurrency videos?

  • @tanvirpathan8993
    @tanvirpathan89933 жыл бұрын

    Hello Jakob, i have found your video's very helpful to understand the multi-threading, I request you to share a video where you show that how to resolve the blocked thread.

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Thank you ! ... What exactly do you mean by "resolve the blocked thread" ?

  • @tanvirpathan8993

    @tanvirpathan8993

    3 жыл бұрын

    @@JakobJenkov ​ @Jakob Jenkov I have a thread dump of an application, lets say 100 threads and out of 100 threads 97 threads running properly and 3 threads are in blocked state. As 3 threads are blocked due to this my application not working properly(request not get completed). I need to make these blocked threads to running state. so that 100 threads should be either in running or ready state but should not be in blocked state.

  • @كلشيءمفيد
    @كلشيءمفيد10 ай бұрын

    You are amazing

  • @JakobJenkov

    @JakobJenkov

    10 ай бұрын

    Thank you 😁

  • @dragonceo5911
    @dragonceo59113 жыл бұрын

    I have bought amd threadripper 32 core 64 thread cpu. Do i still need to use mutithreading for efficiency?

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Wow! Nice CPU! I'd like to have such a CPU :-D ... I think I have 4 cores / 8 threads in my ooold laptop, and 8 cores / 16 threads in my new work laptop. Yes, you *especially* need to use multithreading to use all those cores and threads! If you just use single-threading then you will only use one of the hardware threads, and the rest will be idle (=> being used for whatever else your computer is doing).

  • @dragonceo5911

    @dragonceo5911

    3 жыл бұрын

    @@JakobJenkov Huge fan of you sir! So happy to get a reply from you. You certainly deserve that CPU, so you can make more awesome tutorials :-). Your tutorials made me meet several office deadlines, and get a raise. Thanks for the info on multithreading. I will then go through the Multithreading tutorials from your channel. It is my weak point in Java.

  • @mahek2001
    @mahek2001 Жыл бұрын

    If I may ask , I was wondering that how does this switching between tasks reduces time because if there are 2 task and each one of task takes 1sec to execute.....then anyway to complete execution of both tasks will take 2 sec whether we switch between them too . Is it that if task 2 wants 500ms then it will be finished earlier but then again whole program will take the same time . Please help me this question .

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Task switching only speeds up task execution if the task uses IO, where the CPU is idle while waiting to read or write data to disk or network. During that idle time the CPU can switch to other tasks instead of wasting that CPU time.

  • @anlackermann590

    @anlackermann590

    Жыл бұрын

    ​@@JakobJenkovthanks

  • @chitranshsaxena59
    @chitranshsaxena592 жыл бұрын

    6:46 Why can't CPU invest those cycles into downloading the data faster. I understand it is dependant on several factors like network speed etc. but if possible, then could it be the case that full potential of the CPU is gonna be used to finish this one thread? Also, how do we understand about how does CPU decide when to switch processes and threads?

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    A CPU can only affect what is going on inside the computer. When downloading - the speed is determined by external factors such as network speed and the speed of routers in between your computer and the server you are downloading from - as well as the network speed and traffic load of the server you download from.

  • @AMITTIWARI-re9sg
    @AMITTIWARI-re9sg Жыл бұрын

    Thanks for great explanation. As I can see(in LinkedIn) you are based out of Copenhagen . Do you have any in-person classroom coaching or institute ? I would really love to attend if there is any such. :)

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Hi Amit, no, unfortunately I don't have any in-person classes of any kind, right now. It requires a reasonable amount of space, and that's not cheap! I have been thinking about doing something online, though. But I am not yet sure what the form should be. Discord. StreamYard. Shows with guests. I don't know. Something like that :-)

  • @youssoufcameroon2565
    @youssoufcameroon25652 жыл бұрын

    Jkob Jenkov is Legend

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    Thanks :-)

  • @xsendilien9551
    @xsendilien95513 жыл бұрын

    I'm a bit confused. Multithreading is application's multitasking, or something like this?

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You could say that - but there are (or can be) some subtle differences. Threads may share memory. OS processes (tasks) usually don't.

  • @xsendilien9551

    @xsendilien9551

    3 жыл бұрын

    @@JakobJenkov Thank you Jenkov)

  • @minasalah8210
    @minasalah82103 жыл бұрын

    thank's...

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    You are most welcome :-)

  • @jericho7989
    @jericho79892 жыл бұрын

    Is this playlist in order?

  • @JakobJenkov

    @JakobJenkov

    2 жыл бұрын

    As close to "in order" as I have been able to make it. But - some of the topics are independent, so you can watch them out of order.

  • @jericho7989

    @jericho7989

    2 жыл бұрын

    @@JakobJenkov Thank you sir, 😁

  • @raghavsharma4195
    @raghavsharma41953 жыл бұрын

    Thx sir, is this playlist completed??

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    Well, I just added a video to it today :-) There are still topics to add to this playlist, but I will probably be making videos about other topics than Java Concurrency too, for a while.

  • @arjaymarigondon1485
    @arjaymarigondon14853 жыл бұрын

    Continue to make video turorialsssssss

  • @JakobJenkov

    @JakobJenkov

    3 жыл бұрын

    :-D ... I will try 😉

  • @ahmadalastal5303
    @ahmadalastal530310 ай бұрын

    I am a C++ developer who came to learn Java, I would like to add 1 point regarding IO utilization, the I/O is something managed by the OS and in fact it is also limited to hardware specially when dealing with networking, the network hardware cannot do multiple IO tasks at the same time but the OS manages this so that it appears like that, so for multiple threads doing multiple network operations it is not always faster because of hardware limitation, for example an Ethernet cable or USB 2.0 can only send data or receive data but not both (half duplex) for USB 3.0 > you can send and receive data at the same time (Full duplex), this topic is much deeper that just multiple threads doing multiple network operations.

  • @JakobJenkov

    @JakobJenkov

    10 ай бұрын

    The video never claims that two threads can do IO at the same time. The video claims, that when one thread is processing the data it just loaded via IO, another thread can do IO. That is something different than what you write.

  • @bittupaul9455

    @bittupaul9455

    8 ай бұрын

    8:58 to 9:18 - you mentioned that two threads can do IO at the same time

  • @hamsterhaunter5718

    @hamsterhaunter5718

    Ай бұрын

    @@JakobJenkov Now I am a bit confused. At 8:58 to 9:18, you claimed that two threads can do IO at the same time. This seems to contradict your recent statement that only one thread does IO while the other processes the data. Could you please clarify this point? I appreciate your help in understanding this better.

  • @shanthishanthi7078
    @shanthishanthi7078Ай бұрын

    God bless you ✝️

  • @JakobJenkov

    @JakobJenkov

    Ай бұрын

    Thank you :-)

  • @romulusbucur1237
    @romulusbucur1237 Жыл бұрын

    Introduction for guys who have no programming experience.

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Yup 😊

  • @markomilinkovic179
    @markomilinkovic1792 ай бұрын

    AWESOME VIDEO!

  • @JakobJenkov

    @JakobJenkov

    2 ай бұрын

    Thank you ! 😊😊

  • @markomilinkovic179
    @markomilinkovic1792 ай бұрын

    SO GOOD!

  • @JakobJenkov

    @JakobJenkov

    2 ай бұрын

    Thanks 😁

  • @KratosProton
    @KratosProton Жыл бұрын

    Great explanation!

  • @JakobJenkov

    @JakobJenkov

    Жыл бұрын

    Thanks a lot! :-)

  • @krishnakarthik4752
    @krishnakarthik47529 ай бұрын

    IMO concurrency is a must to learn for any decent developer. I'm glad I learnt some basic multithreading in first year comp sci; it's such an interesting topic

  • @JakobJenkov

    @JakobJenkov

    8 ай бұрын

    It most definitely is - and with the soon-to-come GPU programming APIs for Java, parallelism in Java is about to go to a whole new level :-)

Келесі