Java併發編程實戰---- AQS(二):獲取鎖、釋放鎖

下面我們來關注下AQS的所獲取和鎖釋放。 AQS鎖獲取 AQS包含如下幾個方法: acquire(int arg):以獨佔模式獲取對象,忽略中斷。 acquireInterruptibly(int arg): 以獨佔模式獲取對象,如果被中斷則中止。 acquireShared(int arg): 以共享模式獲取對象,忽略中斷。 acquireSharedInterruptibly(int arg)
相關文章
相關標籤/搜索