- 2
- 0
- 约3.74万字
- 约 43页
- 2019-04-24 发布于未知
- 举报
版本: 2010-07-29
Java并发程序设计教程
温绍锦 (昵称:温少)
邮箱:szujobs@
旺旺:shaojinwensj
QQ: 1420452
Blog:/jobs/
旧时王谢堂前燕,飞入寻常百姓家。
内容列表
1、使用线程的经验:设置名称、响应中断、使用ThreadLocal
2、Executor :ExecutorService和Future ☆☆☆
3、阻塞队列: put和take 、offer和poll、drainTo
4 、线程间的协调手段:lock、condition、wait 、notify、notifyAll ☆☆☆
5、Lock-free: atomic 、concurrentMap.putIfAbsent、CopyOnWriteArrayList ☆☆☆
6、关于锁使用的经验介绍
7、并发流程控制手段:CountDownlatch、Barrier
8、定时器: ScheduledExecutorService 、大规模定时器TimerWheel
9、并发三大定律:Amdahl 、Gustafson、Sun-Ni
10、神人和图书
11、业界发展情况: GPGPU、OpenCL
12、复习题
学习的过程,着重注意红星标识☆的内容,学完之后,要求能够回
答复习题。
启动线程的注意事项
Thread thread = new Thread(thread name) { Thread thread = new Thread() {
public void run() { public void run() {
// do xxx // do xxx
}; } 1 }; } 3
thread.start(); thread.setName(thread name);
thread.start();
public class MyThread extends Thread {
public MyThread() { Thread thread = new Thread(task); // 传入任务
super(thread name); thread.setName(“thread name); 4
} 2 thread.start();
public void run() {
// do xxx
Thread thread = new Thread(task, “thread name);
}
}
原创力文档

文档评论(0)