This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1586887363.84.0.219513408233.issue36780@roundup.psfhosted.org>
In-reply-to
Content
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*.
History
Date User Action Args
2020-04-14 18:02:43pitrousetrecipients: + pitrou, bquinlan, hniksic, asvetlov, torsten, aeros
2020-04-14 18:02:43pitrousetmessageid: <1586887363.84.0.219513408233.issue36780@roundup.psfhosted.org>
2020-04-14 18:02:43pitroulinkissue36780 messages
2020-04-14 18:02:43pitroucreate