摘要: import java.util.concurrent.Callable; import java.util.concurrent.FutureTask; class MyThread3 implements Callable<Integer>{ @Override public Integer c 阅读全文
posted @ 2021-03-10 16:58 DHaiLin 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1、原始构成 synchronized是关键字,属于JVM层面; monitorenter(底层是通过monitor对象完成,其实wait / notify等方法也依赖 monitor对象,只有在同步块或方法中才能调用wait / notify等方法); monitorexit Lock是具体的类( 阅读全文
posted @ 2021-03-10 09:33 DHaiLin 阅读(268) 评论(0) 推荐(0) 编辑
摘要: ArrayBlockingQueue:由数组结构组成的有界阻塞队列; LinkedBlockingQueue:由链表结构组成的有界阻塞队列(但大小默认值为:Integer.MAX_VALUE); PriorityBlockingQueue:支持优先级排序的无界阻塞队列; DelayQueue:使用优 阅读全文
posted @ 2021-03-10 09:03 DHaiLin 阅读(1126) 评论(0) 推荐(0) 编辑