如果返回值不是我关心的,我应该如何在ExecutorService的 提交或执行之间选择?
如果我对两者都进行测试,除了返回值之外,我没有看到两者之间有任何差异。
ExecutorService threadExecutor = Executors.newSingleThreadExecutor();
threadExecutor.execute(new Task());
ExecutorService threadExecutor = Executors.newSingleThreadExecutor();
threadExecutor.submit(new Task());