Java Concurrecy: Volatile vs Atomic - Java Programming

preview_player
Показать описание
In this video, we'll talk about the difference between volatile fields vs atomic variables in the context of Java multithreading and concurrency. A lot of people think marking a field volatile will also make all operations on it atomic, but the two concepts are quite different. Hope you like the video!

My name is Will Tollefson! I'm here to teach you key skills that will help you land your first programming job or stay current and competitive for those promotions in your current job. Subscribe to my channel and I'll help you grow in your programming skills, and make your career soar!

Join me to learn computer programming in an easy to learn way, with a teacher who isn't talking over your head. Or sounds like this. But instead explains things in a way you can understand.

I'm a software engineer in industry who has been coding for over a decade now and my motto is Never Stop Learning. I can give you insight into skills that employers actually care about as in addition to being a programmer I also have hired software engineers.

Ring that notification bell so you never miss fresh content that just might help you with your current programming bug.

I have experience with various types of programming such as mobile phone apps, scientific computational modeling, and embedded communications systems, to name a few, and I've worked on teams ranging from one to over one hundred programmers.

The content I'm offering you is free, self paced, and practical for computer programming jobs. I'll teach you skills you need to be competitive.

Let's dive into programming concepts like algorithms and data structures that are mostly language agnostic.

If you've got ideas of topics or a programming dilemma you want me to cover, drop me a comment! I'll be efficient with your time so without further ado, let's get to it!
Рекомендации по теме
Комментарии
Автор

Awesome video, Will! I can see why people get the atomic keyword and volatile keyword confused. You explained everything so clearly, and also explained more insights in how to handle multithreaded code vs single threaded code.

DenaTollefson
Автор

Nice sir pls continue posting sir coz weve learn alot and hoping that you've come up with java + database. Thank you

jaylordjl
Автор

Great video. Regarding 9:45, because it's an object reference then it's not cached by the thread? Is it always reading from the heap (or L3 perhaps)?

titoluzuriaga
Автор

Very good examples. Thank you very much for sharing

Автор

Nice!! This was a concise quick reference. Thanks a ton!

melwin-dmello-dev
Автор

great explanation!! make a series on concurrency and multithreading. Thanks!!

abhishekwagh
Автор

This is good stuff, thank you for your content

lawrencebeutlich
Автор

Can you share the code samples in gists?

khattami
Автор

if we have 2 threads I expected to see the logs twice, why it print it only once?

blaaarpu