No video

Java Concurrency and Multithreading - Introduction

  Рет қаралды 241,958

Jakob Jenkov

Jakob Jenkov

Күн бұрын

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.jenko...
Java Concurrency Utility tutorial (text):
tutorials.jenko...

Пікірлер: 200
@karaczan5839
@karaczan5839 5 ай бұрын
0% yapping 0% wasting time 0% advertising 100% pure knowledge absolute chad
@JakobJenkov
@JakobJenkov 4 ай бұрын
Thank you very much for your kind words ! :-)
@shubhamagarwal1434
@shubhamagarwal1434 3 ай бұрын
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!! :-)
@abishekraju4521
@abishekraju4521 Ай бұрын
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 Ай бұрын
You are welcome 😊
@kfg645
@kfg645 3 ай бұрын
This is academically rigorous, industrially competitive and very helptul tutorial
@JakobJenkov
@JakobJenkov 3 ай бұрын
Thank you very much !! 😊😊😊
@andrewkang6200
@andrewkang6200 6 ай бұрын
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 ! :-)
@rsenytsya
@rsenytsya 2 ай бұрын
This playlist as well as whole channel is one of those treasures of youtube
@hamsterhaunter5718
@hamsterhaunter5718 2 ай бұрын
agreed
@JakobJenkov
@JakobJenkov Ай бұрын
Thanks a lot !! 😊
@abhaythakur8572
@abhaythakur8572 3 жыл бұрын
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! :-)
@subinos
@subinos 17 күн бұрын
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 17 күн бұрын
Thank you very much! :-) ... I am happy the video series is helpful! :-)
@boltez6507
@boltez6507 3 ай бұрын
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 3 ай бұрын
Than you very much !! 😊😊😊
@priyankawagh5217
@priyankawagh5217 24 күн бұрын
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 23 күн бұрын
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 :-)
@genhub9288
@genhub9288 3 жыл бұрын
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.
@hesona9759
@hesona9759 10 ай бұрын
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 ! :-)
@mostinho7
@mostinho7 3 жыл бұрын
Done thanks! Concurrency vs parallelism OS context switching vs actually running tasks on different cores
@garimadhanania1853
@garimadhanania1853 3 ай бұрын
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 !! 😊
@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
@vaibhav4973
@vaibhav4973 3 жыл бұрын
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.
@hstanciu
@hstanciu 3 жыл бұрын
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 KZfaq as a job - just as a hobby. I like playing with new media and tech, and KZfaq keeps evolving, so it's interesting to be here just to see what it can do.
@dhananjaychoudhary7836
@dhananjaychoudhary7836 5 ай бұрын
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 5 ай бұрын
You are welcome! :-)
@narendrayadav71
@narendrayadav71 Ай бұрын
Bible of Java Concurrency !!! Thanks for the efforts !!!
@JakobJenkov
@JakobJenkov Ай бұрын
You are welcome! :-)
@ericfricke4512
@ericfricke4512 3 жыл бұрын
Great teaching skills! Clear, concise, and engaging :)
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks a lot ! :-)
@sharipovsunnatillo2772
@sharipovsunnatillo2772 8 ай бұрын
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 ! :-)
@KiprutoR
@KiprutoR 3 жыл бұрын
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
@mithunkarthik5551
@mithunkarthik5551 Жыл бұрын
Great explanation, the best video I have ever seen for concurrency
@JakobJenkov
@JakobJenkov Жыл бұрын
Thank you ! :-)
@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! :-)
@Rohitbhole1
@Rohitbhole1 2 жыл бұрын
Thank you so much for making this gold content available. God bless you!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome :-)
@VikramSingh-wy5mn
@VikramSingh-wy5mn 4 ай бұрын
Thanks Jakob for such a nice explanation.
@maturiarun3267
@maturiarun3267 9 ай бұрын
Thank you sir I really appreciate it.After watching these videos ,it literally clarified my doubts a way better.😊
@JakobJenkov
@JakobJenkov 9 ай бұрын
Great! Glad to hear 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) :-)
@abhishekanand3842
@abhishekanand3842 3 жыл бұрын
Wonderful videos..clear explanations of complex topics. Helped me a lot in clearing my basic concepts
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Great to hear! :-)
@cdgtopnp
@cdgtopnp 3 жыл бұрын
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 !!
@sair2917
@sair2917 3 жыл бұрын
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
@MohitKhare
@MohitKhare Жыл бұрын
thanks Jakob. wonderfully explained. you've got a new sub.❤
@JakobJenkov
@JakobJenkov Жыл бұрын
Great ! Thanks ! :-)
@hamdamboyurunov6034
@hamdamboyurunov6034 10 ай бұрын
Really nice explanation and video
@JakobJenkov
@JakobJenkov 10 ай бұрын
Thanks ! :-)
@romanburenko7593
@romanburenko7593 2 жыл бұрын
Awesome tutorial ! The best one I've seen !
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you very much! :-)
@sreenathmca
@sreenathmca 4 жыл бұрын
great explanation.
@JakobJenkov
@JakobJenkov 4 жыл бұрын
Thanks :-)
@17a.studio
@17a.studio 3 жыл бұрын
You're a lifesaver!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Great, thanks :-)
@rahulchauhan-sg3yb
@rahulchauhan-sg3yb 4 жыл бұрын
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! :-)
@maywilliams82
@maywilliams82 9 ай бұрын
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 9 ай бұрын
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 !
@user-em8ns3nw7n
@user-em8ns3nw7n 3 жыл бұрын
Awesome! Your tutorials are extremely useful and easy to understand! Thank you very much.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are most welcome!
@SoeaOu
@SoeaOu 3 жыл бұрын
legend, thanks for putting this out
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! :-)
@vsingh-26
@vsingh-26 3 жыл бұрын
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!
@oleksii_shtanko
@oleksii_shtanko 3 жыл бұрын
Thank you so much for your video. It was easy to understand your explanation. Good job!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Great ! - glad it was helpful!
@fisnikmiftari9611
@fisnikmiftari9611 3 жыл бұрын
Thanks a lot, pretty decent explanation.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks :-)
@tomok284
@tomok284 Жыл бұрын
Clear explanation
@JakobJenkov
@JakobJenkov Жыл бұрын
Thanks 😊
@yaqinup
@yaqinup 4 жыл бұрын
great explanation.. thank you !
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks! :-)
@anthonysouza-pl5pm
@anthonysouza-pl5pm 6 ай бұрын
thats easy to undestand now let me check out how to code using concurrency
@JakobJenkov
@JakobJenkov 6 ай бұрын
Thank you 😊
@lool7922
@lool7922 3 жыл бұрын
What a wonderful explanation, big thanks 😊
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You're very welcome! :-)
@ahmadalastal5303
@ahmadalastal5303 10 ай бұрын
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 2 ай бұрын
@@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.
@tanvirpathan8993
@tanvirpathan8993 3 жыл бұрын
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.
@aaryabhatia2478
@aaryabhatia2478 3 жыл бұрын
great lesson
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thank you :-)
@salahayman3513
@salahayman3513 2 жыл бұрын
one of best content really
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you! :-)
@uditmahajan555
@uditmahajan555 3 жыл бұрын
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?
@mukhtarbimurat5106
@mukhtarbimurat5106 Жыл бұрын
Great, thanks!
@JakobJenkov
@JakobJenkov Жыл бұрын
You are welcome :-)
@taoma9293
@taoma9293 7 ай бұрын
Great lesson ! 🤝
@JakobJenkov
@JakobJenkov 7 ай бұрын
Thanks! 😃
@huynhtrung6338
@huynhtrung6338 2 жыл бұрын
I love your contents very much!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you - very much :-)
@KratosProton
@KratosProton Жыл бұрын
Great explanation!
@JakobJenkov
@JakobJenkov Жыл бұрын
Thanks a lot! :-)
@weaammohamed8992
@weaammohamed8992 Жыл бұрын
clear explanation. Thank you
@JakobJenkov
@JakobJenkov Жыл бұрын
You are welcome! :-)
@كلشيءمفيد
@كلشيءمفيد 11 ай бұрын
You are amazing
@JakobJenkov
@JakobJenkov 11 ай бұрын
Thank you 😁
@priyankjoshi3018
@priyankjoshi3018 3 жыл бұрын
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 :-)
@suprecam9880
@suprecam9880 3 жыл бұрын
Awesome! Big help, thank you
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome - glad you liked it! :-)
@VishalSharma-lo5ol
@VishalSharma-lo5ol 4 жыл бұрын
Very helpful, Thank u :)
@JakobJenkov
@JakobJenkov 4 жыл бұрын
You are welcome :-)
@alessandroporfirio1910
@alessandroporfirio1910 3 жыл бұрын
Very good video, thank you!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Glad you liked it!
@alexandrprodan8794
@alexandrprodan8794 2 жыл бұрын
what a great tutorial!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you :-)
@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 :-)
@xsendilien9551
@xsendilien9551 3 жыл бұрын
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)
@matus6681
@matus6681 3 жыл бұрын
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.
@youssoufcameroon2565
@youssoufcameroon2565 2 жыл бұрын
Jkob Jenkov is Legend
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thanks :-)
@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.
@Das.Kleine.Krokodil
@Das.Kleine.Krokodil Жыл бұрын
Very good!
@JakobJenkov
@JakobJenkov Жыл бұрын
Thanks! :-)
@tianyangren
@tianyangren 4 жыл бұрын
Finally!
@JakobJenkov
@JakobJenkov 4 жыл бұрын
Been waiting for Java Concurrency videos?
@mouradlaraba
@mouradlaraba 3 жыл бұрын
thanks a lot for your generosity sir :)
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! :-)
@kruthiksai2372
@kruthiksai2372 2 жыл бұрын
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.
@jay-rathod-01
@jay-rathod-01 3 жыл бұрын
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.
@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 :-)
@basudapalapur2969
@basudapalapur2969 3 жыл бұрын
Thanks!, Good content!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome! Great to hear! Thanks! :-)
@lifesport1380
@lifesport1380 2 жыл бұрын
Great videos❤️
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you very much! :-)
@Gohel95
@Gohel95 3 жыл бұрын
Thanks mannn❤️
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are welcome :-)
@dragonceo5911
@dragonceo5911 3 жыл бұрын
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.
@markomilinkovic179
@markomilinkovic179 3 ай бұрын
AWESOME VIDEO!
@JakobJenkov
@JakobJenkov 3 ай бұрын
Thank you ! 😊😊
@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
@andrewsoares8941
@andrewsoares8941 11 ай бұрын
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 10 ай бұрын
I am not sure what the exact definition of "multi-processing" is.
@abdulmajeedghandy5407
@abdulmajeedghandy5407 3 жыл бұрын
you're really great thank u very much
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thank you very much ! :-)
@shanthishanthi7078
@shanthishanthi7078 Ай бұрын
God bless you ✝️
@JakobJenkov
@JakobJenkov Ай бұрын
Thank you :-)
@chitranshsaxena59
@chitranshsaxena59 2 жыл бұрын
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.
@seriousskateboarding9938
@seriousskateboarding9938 3 жыл бұрын
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.
@minasalah8210
@minasalah8210 3 жыл бұрын
thank's...
@JakobJenkov
@JakobJenkov 3 жыл бұрын
You are most welcome :-)
@raghavsharma4195
@raghavsharma4195 3 жыл бұрын
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
@arjaymarigondon1485 3 жыл бұрын
Continue to make video turorialsssssss
@JakobJenkov
@JakobJenkov 3 жыл бұрын
:-D ... I will try 😉
@jericho7989
@jericho7989 2 жыл бұрын
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, 😁
@romulusbucur1237
@romulusbucur1237 Жыл бұрын
Introduction for guys who have no programming experience.
@JakobJenkov
@JakobJenkov Жыл бұрын
Yup 😊
@markomilinkovic179
@markomilinkovic179 3 ай бұрын
SO GOOD!
@JakobJenkov
@JakobJenkov 3 ай бұрын
Thanks 😁
@krishnakarthik4752
@krishnakarthik4752 9 ай бұрын
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 9 ай бұрын
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 :-)
@chong9082
@chong9082 3 жыл бұрын
Great explanation!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks! Glad you liked it! :-)
Java Threads - Creating, starting and stopping threads in Java
17:14
The Java Memory Model - The Basics
23:41
Jakob Jenkov
Рет қаралды 124 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 98 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,9 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 8 МЛН
Concurrency Vs Parallelism!
4:13
ByteByteGo
Рет қаралды 72 М.
Screw It, iPhone Air
8:49
TechLinked
Рет қаралды 494 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,5 МЛН
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 906 М.
Java Virtual Threads
9:06
Jakob Jenkov
Рет қаралды 35 М.
CONCURRENCY IS NOT WHAT YOU THINK
16:59
Core Dumped
Рет қаралды 93 М.
But, what is Virtual Memory?
20:11
Tech With Nikola
Рет қаралды 254 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 98 МЛН