约 50 个结果
在新选项卡中打开链接
  1. What does "atomic" mean in programming? - Stack Overflow

    2015年5月8日 · 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 performed on a …

  2. c++ - What exactly is std::atomic? - Stack Overflow

    2015年8月13日 · 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 …

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

    2016年4月30日 · 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 …

  4. c++ - the gist behind atomic shared pointer - Stack Overflow

    2025年1月23日 · At least atomic<shared_ptr<T>> gives you per-object locking, instead of a single lock for the whole stack. So multiple threads can be waiting for different locks if multiple pops start in …

  5. Is there a difference between the _Atomic type qualifier and type ...

    2014年10月20日 · Why the standard make that difference? It seems as both designate, in the same way, an atomic type.

  6. std::atomic<bool>::wait vs. std::condition_variable::wait

    2024年1月16日 · @anatolyg if waiting through std::atomic_bool::wait is somehow inferior to waiting on std::condition_variable, then that'd be a reason to use the old version, at least in some cases. It's a …

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

    2014年6月4日 · 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 …

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

    2013年5月1日 · 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. 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++ …

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

    2025年6月19日 · 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 …