摘要: ```java import java.util.Map; import java.util.concurrent.ConcurrentSkipListMap; /** * 跳表的使用 */ public class ConcurrentSkipListMapDemo { public static void main(String[] args){ ConcurrentSkipListMap m 阅读全文
posted @ 2019-09-05 15:45 fly_bk 阅读(716) 评论(0) 推荐(0)
摘要: ```java import java.util.ArrayList; import java.util.concurrent.ExecutionException; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.concurrent.Recu 阅读全文
posted @ 2019-09-05 14:10 fly_bk 阅读(444) 评论(0) 推荐(0)
摘要: ```java import java.util.concurrent.*; public class DivTask implements Runnable{ int a,b; public DivTask(int a, int b) { this.a = a; this.b = b; } @Override public void run() { double re = a/b; System 阅读全文
posted @ 2019-09-05 11:12 fly_bk 阅读(633) 评论(0) 推荐(0)
摘要: ```java import java.util.concurrent. ; / ThreadPoolExecutor扩展 / public class ExtThreadPool { public static class MyTask implements Runnable{ public St 阅读全文
posted @ 2019-09-05 10:04 fly_bk 阅读(211) 评论(0) 推荐(0)
摘要: ```java import java.util.concurrent. ; / 自定义线程创建 / public class RejectThreadPoolDemo2 { public static class MyTask implements Runnable{ @Override publ 阅读全文
posted @ 2019-09-05 10:02 fly_bk 阅读(259) 评论(0) 推荐(0)
摘要: ```java import java.util.concurrent. ; / | 小于corePoolSize 分配线程执行 任务提交 | | 成功 等待执行 | 大于corePoolSize 提交到等待队列 | | 达到maximumPoolSize线程,提交失败 拒绝执行 | 失败 提交线程 阅读全文
posted @ 2019-09-05 09:12 fly_bk 阅读(2606) 评论(0) 推荐(0)