Antoine Pitrou <solip...@pitrou.net> added the comment:
I don't think there's much ThreadPoolExecutor can do. If you drop the references to the threads, they still exist and they still be waited upon at interpreter exit. The solution is for you to avoid having hanging threads. In the particular case of TCP connections, I'd recommend using a dedicated framework such as asyncio (or Twisted, Tornado, etc.) instead of home-baked networking code. Also, note that Python sockets have a feature called *timeouts*. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36780> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com