We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44876fb commit bf6b57bCopy full SHA for bf6b57b
Lib/test/test_capi/test_misc.py
@@ -2897,6 +2897,18 @@ def run(self):
2897
for tid in py_thread_ids:
2898
self.assertIsInstance(tid, int)
2899
2900
+ # Compare _Py_ThreadId() with _thread.get_ident()
2901
+ is_ident = False
2902
+ if hasattr(os, 'uname'):
2903
+ arch = os.uname().machine
2904
+ else:
2905
+ arch = ''
2906
+ if sys.platform == 'linux' and arch == 'x86-64':
2907
+ is_ident = True
2908
+ if is_ident:
2909
+ for thread in threads:
2910
+ self.assertEqual(thread.py_tid, thread.ident)
2911
+
2912
# make sure that all _Py_ThreadId() are unique
2913
self.assertEqual(len(set(py_thread_ids)), len(py_thread_ids),
2914
py_thread_ids)
0 commit comments