JavaSE --- explicit lock

1 Overview

    1.1, before jdk5 , for  regulating access to shared objects mechanism   only the synchronized , volatile ;

          After jdk5 , provides a  display lock : Lock , ReentrantLock ...;

        Explicit locks  are not   an alternative internal mechanism of the lock , but   when the inner lock proved to be limited, provide a selectable advanced features ;

    1.2、

Guess you like

Origin www.cnblogs.com/anpeiyong/p/12034356.html
Recommended