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 erickpeirson
Recipients asvetlov, bquinlan, erickpeirson, pitrou, serhiy.storchaka, yselivanov
Date 2021-10-04.23:38:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633390738.82.0.688205637944.issue45339@roundup.psfhosted.org>
In-reply-to
Content
> What are examples of your some_important_context()? Is it important to call some code before destroying the thread?

To be honest, pulled a context manager example out of thin air to illustrate the point. But sure, I want to allocate a resource before the thread runs, and release it when the work is done.

> The problem with allowing the user to specify the Thread subclass is that in general using Thread is an implementation detail. ThreadPoolExecutor could be implemented using the low-level _thread module instead. Or in future it can need to create a special Thread subclass, and user-specified Thread subclass can be not compatible with it. 

This is surprising to hear, since I imagine that there are many potential users of this library that are evolving from direct wrangling of Thread objects, where custom Thread subclasses are commonplace. This was certainly the scenario that prompted me to post.

Ultimately it's up to the maintainers what direction the library will go. Are there specific plans to adopt an alternative implementation that is orthogonal to `threading.Thread`? Or are there reasons to think that it is likely? I would submit that maintaining smooth interoperability between this library and the `threading` library would be a welcome constraint, absent specific drivers to the contrary.
History
Date User Action Args
2021-10-04 23:38:58erickpeirsonsetrecipients: + erickpeirson, bquinlan, pitrou, asvetlov, serhiy.storchaka, yselivanov
2021-10-04 23:38:58erickpeirsonsetmessageid: <1633390738.82.0.688205637944.issue45339@roundup.psfhosted.org>
2021-10-04 23:38:58erickpeirsonlinkissue45339 messages
2021-10-04 23:38:58erickpeirsoncreate