My apologies if this is a topic that's been discussed already, but I wasn't able to locate anything in the archive on the subject. I was wondering if there's a fundamental reason for using PyThread_get_thread_ident instead of PyThread_get_thread_native_id for the value of the thread_id field of the PyThreadState object.
The reason why I'm asking is that I would like to have easy access to the native TID on Linux to identify the /proc/stat file associated with the thread from an external process. At the moment I have to resort to calling process_vm_readv to copy the struct pthread over to local VM and then guess where the tid field might be. So, if there's no fundamental reason for thread_id to be PyThread_get_thread_ident, I would like to propose to change it to PyThread_get_thread_native_id instead.