Author pitrou
Recipients aeros, asvetlov, bquinlan, hniksic, pitrou, torsten
Date 2020-04-14.18:02:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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*.
Date User Action Args
2020-04-14 18:02:43pitrousetrecipients: + pitrou, bquinlan, hniksic, asvetlov, torsten, aeros
2020-04-14 18:02:43pitrousetmessageid: <>
2020-04-14 18:02:43pitroulinkissue36780 messages
2020-04-14 18:02:43pitroucreate