一、锁1、悲观锁synchronized (this){
// 业务代码
}
或
// 需要保证多线程使用同一个ReentrantLock
ReentrantLock lock = new ReentrantLock();
loc
2022-07-04