构造方法初始化同步器为非公平同步器
/** * Creates an instance of {@code ReentrantLock}. * This is equivalent to using {@code ReentrantLock(false)}. */ public ReentrantLock() { sync = new NonfairSync(); }
ReentrantLock源码阅读
原文:https://www.cnblogs.com/scorates/p/14603427.html