Runnable task = new Runnable() {
public void run() {
}
};
Callable<Object> c = Executors.callable(task);
Just found that, Executors provides utility method to convert Runnable task into a Callable task. That explains why we don't have overloaded invokeAll which takes Runnable task as well.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…