The Volatile and Synchronized Keywords in Java | Atomic Variables | Java Multithreading | Geekific

  Рет қаралды 38,868

Geekific

3 жыл бұрын

Support us on Patreon: www.patreon.com/Geekific
GitHub Repository: github.com/geekific-official/geekific-youtube/
Stay updated on our videos by subscribing to the channel and hitting the like button!
In a previous video we explained and kind of drilled down the basics of threads and concurrency in a computer program. So, in this video, we take a look at how concurrency is actually implemented in Java by covering the volatile and synchronized keywords, and checking out atomic variables.
Timestamps:
00:00 Introduction
00:29 Visibility vs Atomicity
01:39 The Volatile Keyword
03:49 The Synchronized Keyword
05:20 Atomic Variables
10:58 Thanks for Watching!
If you found this video helpful, check other Geekific uploads:
- What is a Thread?: kzfaq.info/get/bejne/nrRijNWXmdrVhI0.html
- Transient Java Keyword: kzfaq.info/get/bejne/lc5-YNBo1rXSaY0.html
- Must Know Java Keywords!: kzfaq.info/get/bejne/ZpNkZLZ-1LzDhHU.html
- Introduction to Databases - The Fundamentals: kzfaq.info/get/bejne/iZlmesl4xq6uo6M.html
- Thread, Runnable, Callable, Future, ExecutorService: kzfaq.info/get/bejne/qbuGfdKG1Z7Lcpc.html
- Atomic Variables, Adders and Accumulators in Java: kzfaq.info/get/bejne/g9KHa9F1mdqWmqc.html
- Locks, Monitors and Semaphores Explained in Java: kzfaq.info/get/bejne/msqFhshkpp-xfZs.html
#Geekific #Synchronized #Volatile #AtomicVariables #Java

Пікірлер: 55
@monkemode8128
@monkemode8128 Жыл бұрын
This is genuinely one of the best tutorials I've seen on this topic. It seems like there are lots of very beginner resources for learning Java, and lots of really advanced content, but not much in the middle that teaches the broader concepts you need to know to get to the high level.
@maxkolchinsky9544
@maxkolchinsky9544 9 ай бұрын
I read so many articles on this, and used both in real code for years, but only after watching this video I figured out I did not understand how Volatile actually works!! This was an amazing video!
@kamikatz12
@kamikatz12 Жыл бұрын
Thank you so much for taking the time to make such a clear and concise video on the topic. It is much appreciated!
@mindcontrolkmc.3286
@mindcontrolkmc.3286 Жыл бұрын
I don't know but I read and watch a lot of related stuff, but somehow your voice and your video get inside my head and make it more clearer. Thank you bro!!!!
@nehajain6751
@nehajain6751 10 ай бұрын
one of the best tutorial on this topic. Thank you so much for educating us so simply and effectively.
@anshumanmishra5298
@anshumanmishra5298 Жыл бұрын
Perfect place to learn about volatile, synchronized, atomic
@JoaoLima-pq1hm
@JoaoLima-pq1hm 7 ай бұрын
A very good explanation. Thank you for the lesson and for the video.
@ig_haxie
@ig_haxie Жыл бұрын
Man you’re a saviour ❤
@sadiqc8153
@sadiqc8153 2 жыл бұрын
Thanks for fantastic explanation.. I have been working in IT industry past 6 years, but now only i could understood what is really these keywords. Thanks u again
@geekific
@geekific 2 жыл бұрын
You are most welcome :) Glad it was helpful!
@karthickks6493
@karthickks6493 2 жыл бұрын
Beautifully explained :)
@geekific
@geekific 2 жыл бұрын
Thanks a lot :)
@lisali5719
@lisali5719 2 жыл бұрын
Great video! Helped me understand the differences
@geekific
@geekific 2 жыл бұрын
Very glad it did :)
@suyashgupta1741
@suyashgupta1741 2 жыл бұрын
Finally understood it! Thanks for the amazing explanation!
@geekific
@geekific 2 жыл бұрын
Glad it helped!
@iwn77620
@iwn77620 2 жыл бұрын
Excellent explanation, thank you
@geekific
@geekific 2 жыл бұрын
Thank you! Glad you liked it :)
@oefro
@oefro 2 жыл бұрын
Nice job Ed! 👏
@geekific
@geekific 2 жыл бұрын
Thank you! Cheers!
@13success66
@13success66 2 жыл бұрын
Very beautiful explanation ❣️
@geekific
@geekific 2 жыл бұрын
Thank you! Cheers
@hussamkd6327
@hussamkd6327 3 жыл бұрын
You have my like, Subscribe, and respect!!
@geekific
@geekific 3 жыл бұрын
This means a lot
@swethareddy5493
@swethareddy5493 2 жыл бұрын
Please make more videos on Multithreading. Thanks a lot for explaining the concepts With examples. Subscribed from my account, my brother's, father and sisters account as well☺️
@geekific
@geekific 2 жыл бұрын
Sure will do! Thanks a lot, your support means much to me :)
@shebanyadondapati9781
@shebanyadondapati9781 2 жыл бұрын
So cool.. pretty nice explanation 👌
@geekific
@geekific 2 жыл бұрын
Thanks! Glad you liked it :)
@KushagraKanodia-nm1re
@KushagraKanodia-nm1re 2 ай бұрын
great video just one question, when doing the Customer id example, if we are already using the synchronized method to increment id we dont need to use volatile keyword right? l
@vengateshm2122
@vengateshm2122 3 жыл бұрын
Excellent.
@geekific
@geekific 3 жыл бұрын
Many thanks!
@kamallochanpadhi3582
@kamallochanpadhi3582 11 ай бұрын
Only one word ..awesome
@vbar-ukr
@vbar-ukr 3 жыл бұрын
Very good!
@geekific
@geekific 3 жыл бұрын
Thanks a lot!
@anasbouchouha6877
@anasbouchouha6877 Жыл бұрын
Thank you
@nicatbekirzade1852
@nicatbekirzade1852 2 жыл бұрын
good job thanks!!! 👍
@geekific
@geekific 2 жыл бұрын
Glad you liked it!
@soumavanag5025
@soumavanag5025 2 жыл бұрын
Thank you very much :)
@geekific
@geekific 2 жыл бұрын
Glad you liked it!
@oliveryt7168
@oliveryt7168 2 жыл бұрын
Helpful!
@geekific
@geekific 2 жыл бұрын
Glad it was!
@yahiagadouche883
@yahiagadouche883 8 ай бұрын
thanks
@andysierra5141
@andysierra5141 2 жыл бұрын
AWESOME and perfectly clear even for non-english and java noob speaker like me. Thanks so much, this video should have more views indeed.
@geekific
@geekific 2 жыл бұрын
Wow, thanks so much for the feedback, glad you liked it!
@aboudaladdin8604
@aboudaladdin8604 3 жыл бұрын
great !
@geekific
@geekific 3 жыл бұрын
Thanks!
@bunnyland6487
@bunnyland6487 3 жыл бұрын
Superb
@geekific
@geekific 3 жыл бұрын
Thanks :)
@bernaridho
@bernaridho Жыл бұрын
I'm glad you use the term Processor, not CPU. (Main) Memory, not RAM. I use such approach too. The terms CPU and RAM are bad.
@yaarrated2382
@yaarrated2382 2 жыл бұрын
holy shit. Your explanation is fking next level!
@geekific
@geekific 2 жыл бұрын
xD Thank you! Glad you liked it!!
@RanjeetKumar-ld7cl
@RanjeetKumar-ld7cl 3 жыл бұрын
Super
@geekific
@geekific 3 жыл бұрын
Glad you liked it!
@andrewcbuensalida
@andrewcbuensalida 2 жыл бұрын
doesn't the AtomicInteger have to have a static keyword still?
@geekific
@geekific 2 жыл бұрын
Wow, you really payed attention! The idea was to focus more on threading and atomicity not the Customer creation! Cheers :)
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 1,5 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 7 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 1,5 МЛН