Using std::atomic in modern C++ to update a shared value | Introduction to Concurrency in Cpp

preview_player
Показать описание

►Lesson Description: In this lesson we learn how to use std::atomic to avoid using any locks or other primitives to update a shared value.

00:00 Simplifying our update of a single value
1:12 Updating our code with atomic
2:02 Viewing atomic operations overloads available
3:20 Atomics work with simple data types

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

Best concurrency course for c++ beginner level programmers hands down!

aarfeenanees
Автор

2:40 "We have a data race because it's an interleaved operation"

What does interleaved operation mean (in context of concurrency)? I might be wrong but you've not used this term in any of the previous videos.

aarfeenanees
Автор

What is the difference between lock_guard and atomic? Which one is more efficient and how do we choose which one to use? 

P.S. Thank you so much for your videos.

AriTabriz
Автор

so what if we wanted to use our own class objects which has complex structure wouldn't that cause a problem?

sinaezar
Автор

Is there a way to create a atomic array?
eg: std::array<std::atomic<int>, 10> Array;
Is it valid ?

abhimandya