Achieving higher throughput with atomic variables.
使用原子变量获得更高的吞吐量。
Reads and writes of atomic variables have the same memory semantics as read and write access to volatile variables.
读取和写入原子变量与读取和写入对可变变量的访问具有相同的存取语义。
While you may never use atomic variables directly in your classes, there are good reasons to cheer for their existence.
虽然您可能永远不会直接使用原子变量,还是应该为它们的存在而欢呼。
An introduction to nonblocking algorithms: Describes how concurrent algorithms can be implemented without locks, using atomic variables.
非阻塞算法简介:介绍如何使用原子变量而不是锁实现并发算法。
You'll see that atomic variables offer an additional improvement over ReentrantLock, which already had a big advantage over synchronization.
您将看到,虽然ReentrantLock 拥有比同步更多的优点,但相对于 ReentrantLock,原子变量提供了其他改进。
Because so little work is done in each unit of work, the graphs below probably understate the scalability benefits of atomic variables compared to ReentrantLock.
因为在每个工作单元中完成的工作很少,所以下图可能无法完全地说明与ReentrantLock相比,原子变量具有哪些可伸缩性优点。
Under the hood, operations on atomic variables get turned into the hardware primitives that the platform provides for concurrent access, such as compare-and-swap.
在表面之下,原子变量的操作会变为平台提供的用于并发访问的硬件原语,比如比较并交换。
Atomic variables have memory semantics similar to that of volatile variables, but because they can also be modified atomically, they can be used as the basis for lock-free concurrent algorithms.
原子变量的内存语义与volatile变量类似,但是因为它们也可以被原子性地修改,所以可以把它们用作不使用锁的并发算法的基础。
In this installment of the 5 things series, I introduce some of the subtler aspects of multithreaded programming with synchronized methods, volatile variables, and atomic classes.
在这期的5件事系列中,我将通过同步方法、volatile变量和原子类介绍多线程编程的一些更隐晦的方面。
In the following review of locking mechanisms, we first look at the atomic operators, which provide protection for simple variables (counters and bitmasks).
在以下关于锁定机制的讨论中,我们首先看一下原子运算符,它可以保护简单变量(计数器和位掩码(bitmask))。
The atomic variable classes can be thought of as a generalization of volatile variables, extending the concept of volatile variables to support atomic conditional compare-and-set updates.
原子变量类可以认为是volatile变量的泛化,它扩展了可变变量的概念,来支持原子条件的比较并设置更新。
The mechanism of elementary redistrib utionand annealing embrittlement during relaxation Was discussed on the viewpoint ofthe activation energy of atomic diffusion in Ni-P amorphous being variables.
本文从非晶中原子扩散激活能可变化的观点出发,对弛豫过程中元素再分布和脆化机制进行了讨论。
The mechanism of elementary redistrib utionand annealing embrittlement during relaxation Was discussed on the viewpoint ofthe activation energy of atomic diffusion in Ni-P amorphous being variables.
本文从非晶中原子扩散激活能可变化的观点出发,对弛豫过程中元素再分布和脆化机制进行了讨论。
应用推荐