摘要: public class CompletableFutureDemo { public static void main(String[] args) throws Exception { //同步,异步,异步回调 //MQ消息中间件 //同步 CompletableFuture<Void> fut 阅读全文
posted @ 2020-03-16 22:54 常温的冰 阅读(174) 评论(0) 推荐(0)
摘要: 0-100求和:class MyTask extends RecursiveTask<Integer>{ public static final int ADJAST_VALUE = 10; private int begin; private int end; private int result 阅读全文
posted @ 2020-03-16 22:45 常温的冰 阅读(117) 评论(0) 推荐(0)
摘要: 线程池要在执行execute时才会正式创建线程 public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> wo 阅读全文
posted @ 2020-03-16 08:08 常温的冰 阅读(268) 评论(0) 推荐(0)