显示锁的接口主要函数如下: public interface Lock { void lock(); void lockInterruptibly() throws InterruptedException; boolean tryLock(); boolean tryLock(long time, TimeUnit unit) throws InterruptedException; void unlock(); Condition newCondition(); } 下面介绍下每个函数的作用:lock()/unlock()就是普通的获取锁和释放锁方法,lock()会阻塞直到成功。lockI...