公平锁: Threads acquire a fair lock in the order in which they requested it 非公平锁:a nonfair lock permits barging: threads requesting a lock can jump ahead of the queue of waiting threads if the lock happens to be available when it is requested.
jdk1.5并发包中ReentrantLock的创建可以指定构造函数的boolean类型来得到公平锁或非公平锁,关于两者区别,java并发编程实践里面有解释公平锁: Threads acquire a fair lock in the order in which they requested it非公平锁:a nonfair lock permits barging: threa