About 50 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 is well-defined. …

  2. java - Volatile boolean vs AtomicBoolean - Stack Overflow

    Sep 24, 2010 · 5 Boolean primitive type is atomic for write and read operations, volatile guarantees the happens-before principle. So if you need a simple get () and set () then you don't need the …

  3. c++ - Cross-platform Support for 128-bit Atomic Operations in Clang ...

    Jun 19, 2025 · 2 We are currently evaluating 128-bit atomic operation support across platforms and compilers, and I wanted to confirm the level of support available in Clang specifically. Our reference …

  4. c - What are the various ways to disable and re-enable interrupts in ...

    Mar 26, 2022 · For simple copies, some types are naturally atomic (if their size is <= the processor width, or 4 bytes, for example, for most 32-bit MCUs), and you won't need to disable and re-enable …

  5. mongodb - MongoInvalidArgumentError: Update document requires …

    Aug 18, 2021 · MongoInvalidArgumentError: Update document requires atomic operators Asked 4 years, 5 months ago Modified 3 years, 1 month ago Viewed 51k times

  6. 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 with only a …

  7. When should std::atomic_compare_exchange_strong be used?

    Jul 29, 2013 · There are two atomic CAS operations in C++11: atomic_compare_exchange_weak and atomic_compare_exchange_strong. According to cppreference: The weak forms of the functions are …

  8. Is incrementing an int effectively atomic in specific cases?

    The reason num++ appears to be atomic is because on x86 machines, incrementing a 32-bit integer is, in fact, atomic (assuming no memory retrieval takes place). But this is neither guaranteed by the c++ …

  9. Using std::condition_variable with atomic<bool>

    Mar 21, 2016 · There are several questions on SO dealing with atomic, and other that deal with std::condition_variable. But my question if my use below is correct? Three threads, one ctrl thread …

  10. c++ - How to implement an atomic counter - Stack Overflow

    Sep 18, 2023 · Fortunately, the value initializing constructor of an integral atomic is constexpr, so the above leads to constant initialization. Otherwise you'd want to make it -say- a static member of a …