About 24,300,000 results
Open links in new tab
  1. c++ - What exactly is std::atomic? - Stack Overflow

    Aug 13, 2015 · Objects of atomic types are the only C++ objects that are free from data races; that is, if one thread writes to an atomic object while another thread reads from it, the behavior …

  2. linux - How can I use atomic variables in C? - Stack Overflow

    Aug 15, 2014 · The atomic counter is 10000 The non-atomic counter is 8644 The non-atomic counter is very likely to be smaller than the atomic one due to racy access across threads to …

  3. What does "atomic" mean in programming? - Stack Overflow

    May 8, 2015 · 22 Atomic vs. Non-Atomic Operations "An operation acting on shared memory is atomic if it completes in a single step relative to other threads. When an atomic store is …

  4. Can you read the value of std::atomic_flag without modifying it?

    On some platforms the only atomic instructions are exchange instructions. On such platforms, std::atomic_flag::test_and_set() can be implemented with exchange var,1 and clear() with …

  5. How to initialize a std::atomic_flag data member in a constructor

    16 What is a safe way to initialize an std::atomic_flag in a class constructor? how do I initialise an atomic_flag variable if it is a member of a class? seems to be asking the same question I'm …

  6. c++ - How to use std::atomic efficiently - Stack Overflow

    Jan 6, 2012 · std::atomic is new feature introduced by c++11 but I can't find much tutorial on how to use it correctly. So are the following practice common and efficient? One practice I used is …

  7. How to initialize a static std::atomic data member

    0 Since std::atomic_init has been deprecated in C++20, here is a reimplementation which does not raise deprecation warnings, if you for some reason want to keep doing this.

  8. What are atomic types in the C language? - Stack Overflow

    Apr 30, 2016 · I remember I came across certain types in the C language called atomic types, but we have never studied them. So, how do they differ from regular types like int,float,double,long …

  9. What is the difference between std::shared_ptr and std::atomic<std ...

    The atomic "thing" in shared_ptr is not the shared pointer itself, but the control block it points to. meaning that as long as you don't mutate the shared_ptr across multiple threads, you are ok. …

  10. sql - What is atomicity in dbms - Stack Overflow

    Jun 4, 2014 · The definition of atomic is hazy; a value that is atomic in one application could be non-atomic in another. For a general guideline, a value is non-atomic if the application deals …