Closed DavidMarchant closed 5 years ago
The interrupt isn't kill the entire process because execute_threaded_batches
is being called individually for each tool within the tool group.
The interrupt causes the Tasks
to be cancelled which then raises the concurrent.futures.CancelledError
. This error is caught and triggers a graceful shutdown of the batches
.
However the additional calls are causing this process to repeat itself. If all the batches where to be executed together, this shouldn't happen.
Also can you rename execute_threaded_batches
to execute_batches
as they aren't truly threaded anymore (they kinda are but not really).
If >1 tool is being executed and an interrupt is sent the system only interrupts the currently executing tool & the next then begins to execute, meaning you need to spam interrupts if you want to cancel the next & any further tools.
This behavior is undesired, an interrupt being sent should cancel the current and any future tools from executing.