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 vstinner
Recipients serhiy.storchaka, vstinner
Date 2020-09-22.14:32:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> And what if run different threads with the same target or with different targets with the same name?

If multiple Thread objects using the same target (or different targets with the same name), they all get the same name using my PR 22357.

> Would not "Thread-3" be more useful in this case?

Well, that's an open question. In my experience, "Thread" name is pretty useless.

What if I modify my PR to add "-{counter}" (ex: "func-3" for target.__name__="func") to the default name? Reuse _counter().


        self._name = str(name)
            base_name = target.__name__
        except AttributeError:
            base_name = "Thread"
        if not self._name:
            self._name = "{base_name)-{_counter()}"
Date User Action Args
2020-09-22 14:32:03vstinnersetrecipients: + vstinner, serhiy.storchaka
2020-09-22 14:32:03vstinnersetmessageid: <>
2020-09-22 14:32:03vstinnerlinkissue41833 messages
2020-09-22 14:32:03vstinnercreate