public void run() { customFinished(); } });
/** * Declare that the future is finished. * This method is only called for intermediate futures, * i.e. when this method is called it is guaranteed that the * intermediateResultAvailable method was called for all * intermediate results before. */ public final void finished() { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) { customFinished(); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { customFinished(); } }); } }