STINNER Victor <[email protected]> added the comment:
It seems like the feature is only supported by a few operating systems and only
if required functions are available:
#ifdef __APPLE__
volatile uint64_t tid;
pthread_threadid_np(NULL, &tid);
#elif defined(__linux__)
volatile pid_t tid;
tid = syscall(__NR_gettid);
I understand that it's not available on FreeBSD nor Windows?
In that case, I would prefer to only add a threading.get_tid() *function*.
Is it different than threading.get_ident() on Linux?
----------
nosy: +vstinner
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36084>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com