摘要: 1.创建公平锁 1.使用方式 Lock reentrantLock = new ReentrantLock(true); reentrantLock.lock(); //加锁 try{ // todo } finally{ reentrantLock.unlock(); // 释放锁 } 2.创建公 阅读全文
posted @ 2021-01-18 17:52 雪中孤狼 阅读(187) 评论(0) 推荐(0) 编辑