public final int decrementAndGet() { for (;;) { // for (;;) 這樣寫是為什么 有什么好處 int current = get(); int next = current - 1; if (compareAndSet(current, next)) return next; } }
java.util.concurrent.atomic.AtomicInteger
慕桂英4014372
2018-07-15 07:04:42