代码实现 public class CASImplementLock { // 创建原子引用对象,用来存放thread对象。 AtomicReference<Thread> atomicReference = new AtomicReference<