Top "Atomic" questions

An atomic operation is indivisible.

C++ atomic_flag query state

I am using C++ std::atomic_flag as an atomic Boolean flag. Setting the flag to true or false is …

c++ multithreading c++11 atomic
Atomicity on x86

8.1.2 Bus Locking Intel 64 and IA-32 processors provide a LOCK# signal that is asserted automatically during certain critical memory operations to …

c++ multithreading x86 atomic memory-barriers
std::atomic with custom class (C++ 11)

I am using std::atomic with a custom class in my library. All works fine with MSVC, but now that …

c++ xcode c++11 atomic
Acquire/Release versus Sequentially Consistent memory order

For any std::atomic<T> where T is a primitive type: If I use std::memory_order_acq_…

c++ concurrency c++11 atomic
setter and getter for an atomic property

what's the auto-gen'd getter and setter look like for the following property value? ... in .h @interface MyClass : NSObject { @private NSString *_…

objective-c properties atomic getter-setter
Why does an in-place member initialization use a copy constructor in C++11?

I'm a little bit confused about the following code: struct A { std::atomic<int> a = 0; }; Which gives an …

c++ c++11 initialization atomic copy-constructor
Does Django Atomic Transaction lock the database?

When you do: @transaction.atomic def update_db(): do_bulk_update() while the function is running, does it lock the …

django database locking atomic
How do I atomically swap 2 ints in C#?

What (if any) is the C# equivalent of the x86 asm xchg instruction? With that command, which imo is a …

c# .net atomic
Is it normal that the gcc atomic builtins are so slow?

I have an application where I have to increment some statistics counters in a multi-threaded method. The incrementing has to …

c++ performance gcc atomic built-in
Atomic Reference Counting

I'm trying to understand exactly how thread-safe, atomic reference counting works, for example as with std::shared_ptr. I mean, …

c++ multithreading c++11 atomic reference-counting