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 amaury.forgeotdarc, gregory.p.smith, pitrou, rnk, sargo, serhiy.storchaka, vstinner
Date 2015-02-17.23:59:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424217559.43.0.701956517517.issue6532@psf.upfronthosting.co.za>
In-reply-to
Content
On Linux, the following C program tells me that pthread_t is unsigned.
---
#include <pthread.h>
#include <stdio.h>

#define TYPE_IS_SIGNED(TYPE) ((TYPE)-1 < (TYPE)0)

int main()
{
    printf("signed? %i\n", TYPE_IS_SIGNED(pthread_t));
    return 0;
}
---

So it's fair to modify threading.get_ident() to return an unsigned number.

But I disagree to change stable Python versions, it may break applications.

Oh, I wrote write_thread_id() in Python/traceback.c and this function already casts the thread identifier to an unsigned number ;-)
History
Date User Action Args
2015-02-17 23:59:19vstinnersetrecipients: + vstinner, gregory.p.smith, amaury.forgeotdarc, pitrou, rnk, sargo, serhiy.storchaka
2015-02-17 23:59:19vstinnersetmessageid: <1424217559.43.0.701956517517.issue6532@psf.upfronthosting.co.za>
2015-02-17 23:59:19vstinnerlinkissue6532 messages
2015-02-17 23:59:19vstinnercreate