锁机制

锁机制:为了防止cpu切换速度过快,造成我们不想要的结果,将代码用锁锁住,执行完之后在释放

acquire()--->上锁

release()---->解锁

原文地址:https://www.cnblogs.com/startl/p/11971748.html