线程
aongi
自信成功
展开
-
Callable类和Executors类实现简单的异步运算
Callable类实现简单的异步运算代码如下:import java.util.concurrent.ExecutionException;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;/** * Created by Aongi on 2017/4/30. * Versio原创 2017-04-30 16:18:47 · 493 阅读 · 0 评论 -
多线程同步锁实现简单数据的同步输入与输出
多线程同步锁实现简单数据的同步输入与输出Resource类class Resource { public String name; public int age; boolean flag = false;}Input类/** * Created by Aongi on 2017/4/30. * Version 1.0 */class Input implement原创 2017-04-30 23:21:33 · 706 阅读 · 0 评论