Open louisabraham opened 5 years ago
Maybe it would be better to provide a special argument to confirm one really wants to kill a process if the task is already running.
There is a method Future.cancel
, which can cancels jobs that were not already dispatched. Also, it is possible to shutdown the executor with executor.shutdown(kill_workers=True, wait=True)
.
Did you have something more specific in mind?
Pretty old issue but I have the same problem. I'd like to cancel futures (jobs) that run too long. But calling future.cancel()
seems to have no effect on shutting down idle workers after the timeout is reached.
Stopping long running jobs would be a really useful feature, in particular for Las Vegas algorithms that require restarts, or when evaluating generated programs (see tpot).
While googling, I saw that pebble implements this feature.