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 ncoghlan, pdox, pitrou, r.david.murray, tim.peters
Date 2017-10-01.17:34:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506879292.55.0.213398074469.issue31622@psf.upfronthosting.co.za>
In-reply-to
Content
> On a system with pthreads, the thread_id that Python provides is merely pthread_t casted to unsigned long. This works today, but is in violation of the standard, and could break on systems with exotic pthread_t.

I don't think that follows.  Even if pthread_t is not an integer, it does have a binary representation that can be trivially converted to a arbitrary-sized Python int in Python-facing APIs such as threading.get_ident().

(and similarly, of course, for converting in the other direction e.g. for pthread_kill())

> There is also the ability to introduce undefined behavior, such as sending a signal to an invalid thread id:

I wouldn't worry much about pthread_kill(), a little-used feature.
History
Date User Action Args
2017-10-01 17:34:52pitrousetrecipients: + pitrou, tim.peters, ncoghlan, r.david.murray, pdox
2017-10-01 17:34:52pitrousetmessageid: <1506879292.55.0.213398074469.issue31622@psf.upfronthosting.co.za>
2017-10-01 17:34:52pitroulinkissue31622 messages
2017-10-01 17:34:52pitroucreate