摘要:
import java.util.concurrent.Semaphore; /** * * JDK文档使用备注: * Semaphores are often used to restrict the number of threads than * can access some (physical or logical) resource. For example, here ... 阅读全文
posted @ 2017-10-20 20:19
bf378
阅读(1208)
评论(0)
推荐(0)
摘要:
备注:博文仅仅是学习过程中的零散记录,后期整理。 AbstractQueuedSynchronizer的简单介绍可以网上搜索,简单了解字段作用。 示例代码,分析获取锁的过程: 调用lock方法,然后间接调用: 调用如上代码的lock方法,其中的compareAndSetState调用底层操作系统的C 阅读全文
posted @ 2017-10-20 13:15
bf378
阅读(318)
评论(0)
推荐(0)

浙公网安备 33010602011771号