While the atomic variable classes might look superficially like the SynchronizedCounter example in Listing 1, the similarity is only superficial.
虽然原子变量类表面看起来与清单1中的SynchronizedCounter例子一样,但相似仅是表面的。
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变量的泛化,它扩展了可变变量的概念,来支持原子条件的比较并设置更新。
应用推荐