"Java concurrent programming art" of AtomicX

Mainly the lower understand AtomicReferenceandAtomicXUpdater

AtomicReferenceSupport object references atomic updates of class, just support referrals, if you want the object in the field to support atomic updates, be sure to use to AtomicXUpdater.

Fields update class needs special attention, the field must be public volatiletype.

AtomicStampedReferenceAnd AtomicMarkableReferenceare kind to address the ABA problem for (the latter do not know if I have, being no practical experience). The former field update to address aspects of the latter to solve a reference type updates.

Guess you like

Origin www.cnblogs.com/codeleven/p/10962992.html