About 50 results
Open links in new tab
  1. What are atomic operations for newbies? - Stack Overflow

    Sep 6, 2018 · Everything works. Note that "atomic" is contextual: in this case, the upsert operation only needs to be atomic with respect to operations on the answers table in the database; the computer …

  2. 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. …

  3. Which types on a 64-bit computer are naturally atomic in gnu C and …

    Apr 14, 2022 · I had a 25-hr debugging marathon in < 2 days and then wrote this answer here. See also the bottom of this question for more info. and documentation on 8-bit variables having naturally …

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

    May 8, 2015 · In the Effective Java book, it states: The language specification guarantees that reading or writing a variable is atomic unless the variable is of type long or double [JLS, 17.4.7]. What do...

  5. 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 we have a buff...

  6. Is an atomic file rename (with overwrite) possible on Windows?

    Oct 3, 2008 · On POSIX systems rename(2) provides for an atomic rename operation, including overwriting of the destination file if it exists and if permissions allow. Is there any way to get the same …

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

    Dec 26, 2020 · 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 etc., and …

  8. When do I really need to use atomic<bool> instead of bool?

    May 1, 2013 · You need atomic<bool> to avoid race-conditions. A race-condition occurs if two threads access the same memory location, and at least one of them is a write operation. If your program …

  9. How to guarantee 64-bit writes are atomic? - Stack Overflow

    Apr 6, 2015 · When can 64-bit writes be guaranteed to be atomic, when programming in C on an Intel x86-based platform (in particular, an Intel-based Mac running MacOSX 10.4 using the Intel …

  10. Is accessing a variable in C# an atomic operation?

    Aug 13, 2008 · Further confirmation from the C# spec, section 5.5, Atomicity of variable references: Reads and writes of the following data types are atomic: bool, char, byte, sbyte, short, ushort, uint, …