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 fabioz
Recipients fabioz, vstinner
Date 2020-03-13.14:04:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584108284.4.0.636280091105.issue35370@roundup.psfhosted.org>
In-reply-to
Content
I'm iterating on all threads and getting its thread id to find out the thread state (in my use case) and then doing what you just did there...

So, while this solution does work for me, if the idea is making tstate opaque, then having (an optional) thread id in settrace (which iterates to find the proper thread if given) could solve it without having to rely on any CPython internals on my side (although it should probably return a bool to say if it did work then).
History
Date User Action Args
2020-03-13 14:04:44fabiozsetrecipients: + fabioz, vstinner
2020-03-13 14:04:44fabiozsetmessageid: <1584108284.4.0.636280091105.issue35370@roundup.psfhosted.org>
2020-03-13 14:04:44fabiozlinkissue35370 messages
2020-03-13 14:04:44fabiozcreate