ITeye博客

jdk util concurrent 源码阅读(一)

youngphy · 2013-03-08 11:34 · 编程语言 · Markdown

对于object隐式锁和lock(condition)两种方式,下面问题:

  1. entry set 抢锁机制
  2. wait set 唤醒机制(随机?)
  3. wait set 唤醒之后没有抢到锁直接放入entry set?还是继续留存wait set?
  4. reentrantlock lock readwritelock 经典场景

To a great extent, the manner in which a Java Virtual Machine implementation selects the next thread from the wait or entry sets is a decision of individual implementation designers. For example, implementation designers can decide how to select:

  • thread from the wait set given a notify command
  • the order to resurrect threads from the wait set given a notify all command
  • the order to allow threads from the entry set to acquire the monitor
  • how to choose between threads suspended in the wait set versus the entry set after a notify command

阅读资料:

  1. inside jvm
  2. java concurrecy in practice
  3. java 多线程 待补

http://robbinfan.com/blog/38/orm-cache-sumup

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。