多线程
文章平均质量分 67
dongqinging
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Executors 和 ExecutorService
Executors 和 ExecutorService原创 2015-11-03 23:50:10 · 814 阅读 · 0 评论 -
interrupt()中断
中断转载 2015-11-05 19:30:06 · 644 阅读 · 0 评论 -
守护线程中finally语句不一定能够执行
finally,守护线程原创 2015-11-04 23:18:57 · 2086 阅读 · 0 评论 -
线程捕获异常
由于线程的本质特性,不难捕获从线程中逃逸的异常。一旦异常逃出任务的run()方法,它就会像外传播到控制台,在控制台中无法捕获,除法采取特殊的步骤 来捕获这些异常。 import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class ThreadTest impleme原创 2015-11-05 11:01:09 · 495 阅读 · 0 评论 -
ThreadLocal的使用
本文来源于:http://qifuguang.me/2015/09/02/[Java%E5%B9%B6%E5%8F%91%E5%8C%85%E5%AD%A6%E4%B9%A0%E4%B8%83]%E8%A7%A3%E5%AF%86ThreadLocal/ 概述 相信读者在网上也看了很多关于ThreadLocal的资料,很多博客都这样说:ThreadLocal为解决多线程程序的并原创 2015-10-31 09:29:41 · 468 阅读 · 0 评论 -
ThreadFactory, ExecutorService的简单使用
Executors中: /** * Creates a thread pool that creates new threads as needed, but * will reuse previously constructed threads when they are * available, and uses the provided *原创 2015-11-05 00:24:56 · 1262 阅读 · 0 评论 -
CountDownLatch用法
CountDownLatch原创 2015-11-06 00:02:53 · 842 阅读 · 0 评论 -
Callable从任务中产生返回值
Callable ,Future,Executors原创 2015-11-04 01:23:03 · 1904 阅读 · 0 评论 -
DeadLock Prevention
本文来源与:http://tutorials.jenkov.com/java-concurrency/deadlock-prevention.html In some situations it is possible to prevent deadlocks. I'll describe three techniques in this text: Lock OrderingLo翻译 2016-03-12 00:21:35 · 613 阅读 · 0 评论 -
理解interrupt()方法
java interrupt()方法只是设置线程的中断标记,当对处于阻塞状态的线程调用interrupt方法时(处于阻塞状态的线程是调用sleep, wait, join 的线程),会抛出InterruptException异常,而这个异常会清除中断标记。原创 2016-12-27 10:51:08 · 20228 阅读 · 2 评论
分享