I have just declared some variable types that I clearly know, and I used the cleanest Pyrex counter loop.
我只声明了早已知道的一些变量类型,并使用最干净的Pyrex counter循环。
The examples so far -- counter and stack -- are very simple nonblocking algorithms and are easy to follow once you grasp the pattern of using CAS in a loop.
目前为止的示例(计数器和堆栈)都是非常简单的非阻塞算法,一旦掌握了在循环中使用 CAS,就可以容易地模仿它们。
By default, this counter starts at 1 and is incremented each time the loop is taken.
默认情况下,这个计数器从1开始,每执行一次循环递增一次。
应用推荐