У меня есть ScheduledExecutorService
с задачами, которые планируется выполнить за час. Как получить список невыполненных задач, чтобы я мог заставить их работать сразу?
Я полагаю, что shutdown()
будет ждать час, и похоже, что shutdownNow()
возвращает список Runnables, который не может быть запущен(), поскольку реализация Runnable проверяет состояние Executor и когда она замечает, что она отключила Runnable отказывается бежать. См. ScheduledThreadPoolExecutor.ScheduledFutureTask.run()
для фактической реализации.
Любые идеи?