We use the ScheduledThreadPoolExecutor and after submitting the job we call shutdown immediately. Because as per doc Shutdown does not kill the submitted task, running task and allows it to complete.
The question is after shutdown can we continue to use the future object that the ScheduledThreadPoolExecutor submit returns.
private static Future submitACall(Callable callableDelegate) { ScheduledThreadPoolExecutor threadPoolExe = null; try { threadPoolExe = new ScheduledThreadPoolExecutor(1); return threadPoolExe.submit(callableDelegate); } finally { threadPoolExe.shutdown(); } } //in another method... if(future.isDone()) future.get();