Hello,
I have found that keyboard interrupt does not work on Windows (I haven't tested it on other platforms).
What I found is that concurrent.futures.wait() does not return on the keyboard interrupt, making it necessary to introduce a timeout so the system can process the exception.
In ffmpeg.py execute() I tried changing:
done, pending = concurrent.futures.wait(futures, return_when=concurrent.futures.FIRST_EXCEPTION)
self._executed = False
to:
pending = futures
try:
while pending:
done, pending = concurrent.futures.wait(
futures,
timeout=1,
return_when=concurrent.futures.FIRST_EXCEPTION,
)
except KeyboardInterrupt as e:
self.terminate()
executor.shutdown(wait=True, cancel_futures=True)
raise e
self._executed = False
With that change, keyboard interrupt works as expected.
Hello,
I have found that keyboard interrupt does not work on Windows (I haven't tested it on other platforms).
What I found is that
concurrent.futures.wait()does not return on the keyboard interrupt, making it necessary to introduce a timeout so the system can process the exception.In
ffmpeg.pyexecute()I tried changing:to:
With that change, keyboard interrupt works as expected.