ReentrantLock

ReentrantLock 概念 ReentrantLock 来自java.util.concurrent 包 除了Synchronized 外,ReentrantLock 同样可以实现同步机制。 Synchronized为API层面的互斥锁(lock0)和unlock()方法配合tryfinally语句块来完成) ReentrantLock为原生语法层面的互斥锁。 ReentrantLock 是
相关文章
相关标签/搜索