Top "Atomic" questions

An atomic operation is indivisible.

Are primitive data types in c# atomic (thread safe)?

For example, do I need to lock a bool value when multithreading?

c# atomic primitive thread-safety
Moving a directory atomically

I have two directories in the same parent directory. Call the parent directory base and the children directories alpha and …

linux bash atomic
Django nested transactions - “with transaction.atomic()”

I would like to know if I have something like this: def functionA(): with transaction.atomic(): #save something functionB() def …

django transactions nested atomic
Can a bool read/write operation be not atomic on x86?

Say we have two threads, one is reading a bool in a loop and another can toggle it at certain …

c++ x86 boolean atomic
c++, std::atomic, what is std::memory_order and how to use them?

Can anyone explain what is std::memory_order in plain English, and how to use them with std::atomic<&…

c++ multithreading atomic memory-model stdatomic
Atomic swap in GNU C++

I want to verify that my understanding is correct. This kind of thing is tricky so I'm almost sure I …

c++ g++ atomic atomic-swap
Atomicity in C++ : Myth or Reality

I have been reading an article about Lockless Programming in MSDN. It says : On all modern processors, you can assume …

c++ atomic memory-alignment
Is there a way to make a function atomic in C?

Is there a way to make a function atomic in C. I am not looking for a portable solution.(platforms …

c atomic operations
C++11: write move constructor with atomic<bool> member?

I've got a class with an atomic member variable: struct Foo { std::atomic<bool> bar; /* ... lots of other …

c++ c++11 atomic move-semantics libstdc++
CUDA atomicAdd for doubles definition error

In previous versions of CUDA, atomicAdd was not implemented for doubles, so it is common to implement this like here. …

cuda atomic nvidia