-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
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 = Falseto:
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 = FalseWith that change, keyboard interrupt works as expected.
Metadata
Metadata
Assignees
Labels
No labels