摘要:
private int i = 1; @Test public void reentrantLock(){ // 可重入 默认非公平锁 ReentrantLock lock = new ReentrantLock(); for (int j = 0; j < 1000; j++) { new Thr 阅读全文
摘要:
private int i = 1; @Test public void readWriteLock(){ ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); for (int j = 0; j < 100; j++) { // 如 阅读全文