Message410762
Ah, sorry, I could have described the issue better. It's not a problem with exporting, PyThread_get_thread_native_id() isn't available on Solaris (and possibly other platforms) at all.
https://github.com/python/cpython/blob/main/Include/pythread.h#L28
https://github.com/python/cpython/blob/main/Python/thread_pthread.h#L329
The reason I didn't implement it yet is that Solaris doesn't expose anything like native thread id. We do have functions like `_lwp_self()` or `pthread_self()` or `thr_self()` but neither of them returns id where "value may be used to uniquely identify this particular thread system-wide". (I presume that means that no other thread of no other process running on a given system would return the same number - all these functions return single digit numbers so there is no way they are unique system wide).
If necessary, I guess that such a number can be created by masking pid and thread id together, but then there's a question of how it is supposed to be used (because OS would not understand it). |
|
Date |
User |
Action |
Args |
2022-01-17 11:47:39 | kulikjak | set | recipients:
+ kulikjak, vstinner, petr.viktorin, miss-islington, shihai1991 |
2022-01-17 11:47:39 | kulikjak | set | messageid: <1642420059.83.0.499082152795.issue44133@roundup.psfhosted.org> |
2022-01-17 11:47:39 | kulikjak | link | issue44133 messages |
2022-01-17 11:47:39 | kulikjak | create | |
|