• 前言 使用 ReentrankLock 比直接使用 synchronized 更安全,可以替代 synchronized 进行线程同步. 对比 synchronized 配合 wait 和 notify 实现线程在条件不满足时等待,条件满足时唤醒...
    • 1年前