[New-bugs-announce] [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX
report at bugs.python.org
Wed Nov 18 10:50:16 EST 2015
New submission from Ed Schouten:
While trying to port Python over to a new platform (CloudABI), I noticed a couple of compiler errors in PyThread_create_key(), PyThread_delete_key(), PyThread_delete_key_value() and PyThread_set_key_value() caused by fact that pthread_key_t is converted to an integer (and vice versa)
POSIX doesn't seem to require that pthread_key_t is an integer or any other arithmetic type:
Old revisions of the standard did require pthread_t to be an arithmetic type, but this requirement was dropped later on.
In my opinion we should strongly consider changing the API, so that we can treat the key created by pthread_key_create() or returned by TlsAlloc() as an opaque type.
components: Interpreter Core
title: PyThread assumes pthread_key_t is an integer, which is against POSIX
versions: Python 3.5
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce