Lock接口

Lock接口: public interface Lock。Lock 實現提供了比使用 synchronized 方法和語句可獲得的更廣泛的鎖定操作。實現類:ReentrantLock。。。 主要方法: void lock()獲取鎖。    void unlock()釋放鎖。  代碼示例:
相關文章
相關標籤/搜索