[issue36084] Threading: add builtin TID attribute to Thread objects
STINNER Victor
report at bugs.python.org
Mon May 13 05:13:20 EDT 2019
STINNER Victor <vstinner at redhat.com> added the comment:
I dislike adding a function which always return 0 when the feature is not supported:
unsigned long
PyThread_get_thread_native_id(void)
{
...
#if ...
...
#else
unsigned long native_id;
native_id = 0;
#endif
return (unsigned long) native_id;
}
I would prefer to not define the function if it's not available, so the attribute would be missing.
With the commited change, how can I know if native thread identifier is supported or not?
----------
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36084>
_______________________________________
More information about the Python-bugs-list
mailing list