Thread Congestion in Java

  Рет қаралды 9,686

Jakob Jenkov

Jakob Jenkov

Күн бұрын

Пікірлер: 46
@mathiassintal2237
@mathiassintal2237 3 жыл бұрын
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!
@JakobJenkov
@JakobJenkov 3 жыл бұрын
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 :-)
@Rhemaxus
@Rhemaxus 2 жыл бұрын
Спасибо!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Hi Rhemaxus, thank you for the tip ! :-) ... I did not realize there was a tip attached to this comment until today! Thanks again! :-)
@menchomenchev8973
@menchomenchev8973 2 жыл бұрын
Thank you for all the effort you put in Jakob!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome! And thank you for telling me! :-)
@mostinho7
@mostinho7 3 жыл бұрын
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
@JakobJenkov
@JakobJenkov 3 жыл бұрын
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).
@DJcRuT000
@DJcRuT000 2 жыл бұрын
Thank you for great explanation and adding illustrations to your videos it really helps to understand!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome! :-) I am happy you liked them!
@gracewannemacher
@gracewannemacher 2 жыл бұрын
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.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
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" ;-)
@garimadhanania1853
@garimadhanania1853 8 ай бұрын
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
@AbiSaran4413
@AbiSaran4413 2 жыл бұрын
Nice tutorial, thanks. Please upload atleast one video per week.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thanks! ... I wish I had the time to upload tutorials that often - but unfortunately I don't :-/
@ДмитрийСимон-й9н
@ДмитрийСимон-й9н 9 ай бұрын
Thank you! Was very helpful! Does keepRunning need to be atomic?
@edward69951
@edward69951 2 жыл бұрын
Very good tutorial, really appreciated it.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you ! :-)
@yangfanzheng4323
@yangfanzheng4323 2 жыл бұрын
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)
@yangfanzheng4323
@yangfanzheng4323 2 жыл бұрын
A call to start() on a thread happens-before any actions in the started thread.
@rakhmankobek5703
@rakhmankobek5703 3 жыл бұрын
Thank you very much! Really great video.
@JakobJenkov
@JakobJenkov 3 жыл бұрын
Thanks ! Glad you liked it! :-)
@kafychannel
@kafychannel Жыл бұрын
great tutorials thank you!
@JakobJenkov
@JakobJenkov Жыл бұрын
You are welcome! :-)
@kavishkamadhudhan1943
@kavishkamadhudhan1943 2 жыл бұрын
Thank you very much for this amazing tutorial and l learned lot from this. Also, It's easily understandable.♥
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Thank you! I am happy to hear that! :-)
@jasonadventure2265
@jasonadventure2265 2 жыл бұрын
Great Thanks for this tutorial, really helpful.
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome ! :-)
@The2araf
@The2araf 2 жыл бұрын
Thank you very much!
@JakobJenkov
@JakobJenkov 2 жыл бұрын
You are welcome!
@garimadhanania1853
@garimadhanania1853 8 ай бұрын
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?
@JakobJenkov
@JakobJenkov 8 ай бұрын
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.
@amalangelraj
@amalangelraj 2 жыл бұрын
Your java se tutorial site is not working, could you please make it up and running
@JakobJenkov
@JakobJenkov 2 жыл бұрын
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!
@amalangelraj
@amalangelraj 2 жыл бұрын
@@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!
@amalangelraj
@amalangelraj 2 жыл бұрын
@@JakobJenkov is there any cloud infrastructure that is free to learn/use for learning java development?
@raj_kundalia
@raj_kundalia 3 ай бұрын
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.
@JakobJenkov
@JakobJenkov 2 ай бұрын
That is a reference to other videos in that playlist. The issue of "thread visibility" is covered in other videos in this playlist.
@stalliow404
@stalliow404 2 жыл бұрын
Where can we find the source code
@JakobJenkov
@JakobJenkov 2 жыл бұрын
On GitHub - here: github.com/jjenkov/java-examples/tree/main/src/main/java/com/jenkov/java/concurrency/threadcongestion
@TRUTHF0RCE
@TRUTHF0RCE 2 жыл бұрын
Hi. Your website is down, just sayin
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Had unstable server, and DNS issues lately...
@cherrejim
@cherrejim 2 жыл бұрын
Thanks for your job. I'd like a video about ForkJoinPool... If you want ideas 💡
@JakobJenkov
@JakobJenkov 2 жыл бұрын
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
@alexop5919
@alexop5919 2 жыл бұрын
Next Project Loom?
@JakobJenkov
@JakobJenkov 2 жыл бұрын
Project Loom is not yet finalized, as far as I know.
Thread Signaling in Java
23:26
Jakob Jenkov
Рет қаралды 13 М.
Race Conditions in Java Multithreading
22:39
Jakob Jenkov
Рет қаралды 35 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
False Sharing in Java
17:33
Jakob Jenkov
Рет қаралды 13 М.
Java ConcurrentMap and ConcurrentHashMap
14:42
Jakob Jenkov
Рет қаралды 2 М.
Single-threaded and Same-threaded designs
18:01
Jakob Jenkov
Рет қаралды 13 М.
Deadlock Prevention in Java
17:49
Jakob Jenkov
Рет қаралды 16 М.
The Java Memory Model - The Basics
23:41
Jakob Jenkov
Рет қаралды 135 М.
Java Threads - Creating, starting and stopping threads in Java
17:14
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 83 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 329 М.
Java ForkJoinPool
27:32
Jakob Jenkov
Рет қаралды 8 М.
Java Lock
28:51
Jakob Jenkov
Рет қаралды 48 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН