继续上一次https://www.cnblogs.com/webor2006/p/11756563.html的Lock文档说明进行阅读:
![](https://img-blog.csdnimg.cn/img_convert/28b322b8c8392c90a0d3569dc1d2bcae.png)
![](https://img-blog.csdnimg.cn/img_convert/d63053304234be618d539531d614bc5e.png)
![](https://img-blog.csdnimg.cn/img_convert/c79a8ca52bc38e6c7ad7f76933b358e6.png)
![](https://img-blog.csdnimg.cn/img_convert/40bcac74992767e150c300891569ead5.png)
![](https://img-blog.csdnimg.cn/img_convert/7a31a2466ded0f82da3de509f65435de.png)
![](https://img-blog.csdnimg.cn/img_convert/9acb96e1b6236b92a694047c78646580.png)
![](https://img-blog.csdnimg.cn/img_convert/ea34a77b2e6dae3b476024d44fc5dbce.png)
以上就是对于Lock类中官方解读,下面再纵览一下它里面的方法:
![](https://img-blog.csdnimg.cn/img_convert/efc0749f10faefd4acb516e7b599480d.png)
下面简单也来了解一下里面方法的作用:
![](https://img-blog.csdnimg.cn/img_convert/a7d94f26638438737ec308851f259425.png)
它有点类似于synchronized的效果,下面再来看另位一个方法:
![](https://img-blog.csdnimg.cn/img_convert/30a55c76dd1b109f63d5326fdd330c0c.png)
![](https://img-blog.csdnimg.cn/img_convert/728e911f955fb1288d0ead833aeaedef.png)
继续,这个方法在实际中就会用得比较频繁了,瞅一下:
![](https://img-blog.csdnimg.cn/img_convert/a8d80db968673397330b6fce6a96e847.png)
接下来继续看下一个方法,也在实际当中会经常用的,如下:
![](https://img-blog.csdnimg.cn/img_convert/47c8e99a78fb2e82cce9c31eca112041.png)
![](https://img-blog.csdnimg.cn/img_convert/492d0e049814853cd0d7aed497d020ac.png)
![](https://img-blog.csdnimg.cn/img_convert/612d95ec438a91ca711965ce62d16eef.png)
还剩最后一个方法,瞅一下:
![](https://img-blog.csdnimg.cn/img_convert/319be22e39ac9f8bdb6ef62a9c2edac8.png)
继续上一次https://www.cnblogs.com/webor2006/p/11756563.html的Lock文档说明进行阅读:
以上就是对于Lock类中官方解读,下面再纵览一下它里面的方法:
下面简单也来了解一下里面方法的作用:
它有点类似于synchronized的效果,下面再来看另位一个方法:
继续,这个方法在实际中就会用得比较频繁了,瞅一下:
接下来继续看下一个方法,也在实际当中会经常用的,如下:
还剩最后一个方法,瞅一下: