提交 79bc5067 编写于 作者: 武汉红喜's avatar 武汉红喜

concurrent test

上级 b39a02b3
......@@ -20,5 +20,6 @@ public class CallableTest {
long begin = System.currentTimeMillis();
System.out.println(future.get());
System.out.println(System.currentTimeMillis() - begin);
executorService.shutdown();
}
}
......@@ -25,5 +25,6 @@ public class FutureTaskTest {
if (!task2.isCancelled()) {
System.out.println(task2.get());
}
executorService.shutdown();
}
}
......@@ -18,5 +18,6 @@ public class RunnableTest {
Future<String> future = executorService.submit(() ->
System.out.println("..."), "world");
System.out.println(future.get());
executorService.shutdown();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册