I watched all of your videos in this playlist and almost everything is very simple explained and easily understandable. Thank you so much for the high quality content and your very good teaching! Much love, I really appreciate your work!
You are welcome! Glad it was helpful and easy to understand! I put a lot of effort into making the topics easy to understand, so I am always happy whenever a person experience that it was :-)
Done thanks great video Thread congestion due to lock contention, as you increase consumer threads throughout will increase but eventually decrease due to congestion Solution give each thread its own data structure or use lock free DS
When 2 threads each increment the same counter 1 million times - then the final total number of increments will be 2 million - but only the last thread to reach 1 million increments will see the final total of 2 million increments when it checks the total (after making its own 1 million increments).
Hi Jakob, I watched all your videos in this playlist and it really helped me as someone new to Java. These must have taken a lot of time. Thank you for making these! And let us know if you plan on opening a Patreon again.
Hi Grace, thank you for letting me know! :-) I did have a Patreon account at some point, but only 2 people ever signed up, and they didn't remain signed up for long, so I ended up shutting it down. Developers are notorious for expecting everything "for free" ;-)
also a tip: it would have been good to see the time difference in performance for the 2 examples discussed, that way we can say that the 1st example takes more time to consume because of the blocking
you don't actually need to synchronize the local variable in main method. In JMM, if thread A run action a before it starts the Thread B while b is the first action in Thread B, then the hb(a, b)
question: lets say there are two cores and one thread running on each core, so basically 2 threads running in parallel lets say there are two tasks in the blocking queue if thread1 and thread2 parallelly try to access the queue to pick up the tasks, one of them gets blocked and say thread1 is able to pick up task1, now only when thread1 has stopped accessing the queue can thread2 read task2 from the queue? Both it could happent that thread1 started executing task1 and just after that thread2 picked and started executing task2, and now both threads are running parallelly? Long story short, the blocking is only for accessing the queue to pick up tasks and not to execute the tasks themselves right?
Why did you mention that you have added synchronized keyword during starting of threads in line 17-22, for visibility issues? I have gone through the video but could not understand the reference here? Thank you in advance.
The old server has become unstable. I have been in the process of moving to cloud infrastructure, so going forward it should all get much more stable over time!
@@JakobJenkov i can't beleive that my role model and (guru like) good soul is replying to me! Thank you for your time. I want guidance from you, on how to proceed after completing java se tutorial. I wanted to become a good java developer! Shall i start studying spring tutorial or jsp, servlets and ejb? Im learning a little bit of basics of python since i heard that there is jython (java + python) If you could help me by giving a road map to become a good developer, it would be a great support for me to get a job. Please help me to learn development, so that i can reduce burden of my family especially i wanna pay back my mother who supported me in my tough times!
Feedback and ideas are always welcome! :-) I've had some months with too many other things going on - so not enough time to make videos. But I think I will get some done again soon. Got a mixed bag of topics I have material enough to make videos about. Regarding the ForkAndJoinPool - I actually have a textual tutorial on my tutorial website you can start with (until I get around to making a video): jenkov.com/tutorials/java-util-concurrent/java-fork-and-join-forkjoinpool.html
I watched all of your videos in this playlist and almost everything is very simple explained and easily understandable. Thank you so much for the high quality content and your very good teaching!
Much love, I really appreciate your work!
You are welcome! Glad it was helpful and easy to understand! I put a lot of effort into making the topics easy to understand, so I am always happy whenever a person experience that it was :-)
Thank you for all the effort you put in Jakob!
You are welcome! And thank you for telling me! :-)
Done thanks great video
Thread congestion due to lock contention, as you increase consumer threads throughout will increase but eventually decrease due to congestion
Solution give each thread its own data structure or use lock free DS
When 2 threads each increment the same counter 1 million times - then the final total number of increments will be 2 million - but only the last thread to reach 1 million increments will see the final total of 2 million increments when it checks the total (after making its own 1 million increments).
Thank you! Was very helpful! Does keepRunning need to be atomic?
Thank you for great explanation and adding illustrations to your videos it really helps to understand!
You are welcome! :-) I am happy you liked them!
Hi Jakob, I watched all your videos in this playlist and it really helped me as someone new to Java. These must have taken a lot of time. Thank you for making these! And let us know if you plan on opening a Patreon again.
Hi Grace, thank you for letting me know! :-) I did have a Patreon account at some point, but only 2 people ever signed up, and they didn't remain signed up for long, so I ended up shutting it down. Developers are notorious for expecting everything "for free" ;-)
also a tip: it would have been good to see the time difference in performance for the 2 examples discussed, that way we can say that the 1st example takes more time to consume because of the blocking
Nice tutorial, thanks. Please upload atleast one video per week.
Thanks! ... I wish I had the time to upload tutorials that often - but unfortunately I don't :-/
you don't actually need to synchronize the local variable in main method. In JMM, if thread A run action a before it starts the Thread B while b is the first action in Thread B, then the hb(a, b)
A call to start() on a thread happens-before any actions in the started thread.
question: lets say there are two cores and one thread running on each core, so basically 2 threads running in parallel
lets say there are two tasks in the blocking queue
if thread1 and thread2 parallelly try to access the queue to pick up the tasks, one of them gets blocked and say thread1 is able to pick up task1, now only when thread1 has stopped accessing the queue can thread2 read task2 from the queue? Both it could happent that thread1 started executing task1 and just after that thread2 picked and started executing task2, and now both threads are running parallelly?
Long story short, the blocking is only for accessing the queue to pick up tasks and not to execute the tasks themselves right?
Yes, the BlockingQueue only guards access to the queue itself. It does not affect what the threads do with the objects taken from the queue.
Спасибо!
Hi Rhemaxus, thank you for the tip ! :-) ... I did not realize there was a tip attached to this comment until today!
Thanks again! :-)
Thank you very much for this amazing tutorial and l learned lot from this. Also, It's easily understandable.♥
Thank you! I am happy to hear that! :-)
great tutorials thank you!
You are welcome! :-)
Thank you very much!
You are welcome!
Very good tutorial, really appreciated it.
Thank you ! :-)
Why did you mention that you have added synchronized keyword during starting of threads in line 17-22, for visibility issues? I have gone through the video but could not understand the reference here? Thank you in advance.
That is a reference to other videos in that playlist. The issue of "thread visibility" is covered in other videos in this playlist.
Thank you very much! Really great video.
Thanks ! Glad you liked it! :-)
Great Thanks for this tutorial, really helpful.
You are welcome ! :-)
Your java se tutorial site is not working, could you please make it up and running
The old server has become unstable. I have been in the process of moving to cloud infrastructure, so going forward it should all get much more stable over time!
@@JakobJenkov i can't beleive that my role model and (guru like) good soul is replying to me! Thank you for your time.
I want guidance from you, on how to proceed after completing java se tutorial. I wanted to become a good java developer!
Shall i start studying spring tutorial or jsp, servlets and ejb?
Im learning a little bit of basics of python since i heard that there is jython (java + python)
If you could help me by giving a road map to become a good developer, it would be a great support for me to get a job.
Please help me to learn development, so that i can reduce burden of my family especially i wanna pay back my mother who supported me in my tough times!
@@JakobJenkov is there any cloud infrastructure that is free to learn/use for learning java development?
Hi. Your website is down, just sayin
Had unstable server, and DNS issues lately...
Where can we find the source code
On GitHub - here:
github.com/jjenkov/java-examples/tree/main/src/main/java/com/jenkov/java/concurrency/threadcongestion
Thanks for your job. I'd like a video
about ForkJoinPool... If you want ideas 💡
Feedback and ideas are always welcome! :-) I've had some months with too many other things going on - so not enough time to make videos. But I think I will get some done again soon. Got a mixed bag of topics I have material enough to make videos about. Regarding the ForkAndJoinPool - I actually have a textual tutorial on my tutorial website you can start with (until I get around to making a video):
jenkov.com/tutorials/java-util-concurrent/java-fork-and-join-forkjoinpool.html
Next Project Loom?
Project Loom is not yet finalized, as far as I know.