//Reentrant的其他方法://先看lockInterruptibly方法,该方法主要用于如果该线程未被中断则获取锁publicvoidlockInterruptibly()throwsInterruptedException{sync.acquireInterruptibly(1);}publicfinalvoidacquireInterruptibly(intarg)throwsInterruptedException{//如果当前线程已经被中断抛出异常if(Thread...
查看全文