Рет қаралды 33,196
A quick intro to C++ atomic variables and why you might want to use them when writing multithreaded code (or why you might NOT want to use them).
You should definitely check out this CppCon video to get a full explaination of Atomics from the very basic right up to the advanced level.
CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”
• CppCon 2017: Fedor Pik...
Here is the compiler explorer link to the very simple program that shows the copy, modify and write operation.
godbolt.org/z/p3cu2m