I'm using Python 2.7, and my program ignores SIGTERM signals when using ThreadPoolExecutor.
After some debugging I found that my main thread is blocked on Thread.join(), and it holds the interruption until the call returns.
My solution is to use join(timeout), as it will respect the interruptions and allow the program to exit properly.
The next issue I found was that the atexit hook will try to wait for pending threads anyway.
If the program ended without waiting on these, I suppose skipping this step is probably not too bad either.
Not a great solution, but works for me :)
Original issue reported on code.google.com by
pa...@inutilfutil.comon 1 Nov 2013 at 11:57Attachments: