mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #11223: Replace threading._info() by sys.thread_info
This commit is contained in:
parent
fab6c70770
commit
d5c355ccc7
13 changed files with 119 additions and 108 deletions
|
@ -27,15 +27,10 @@ except ImportError:
|
|||
# and unmaintained) linuxthreads threading library. There's an issue
|
||||
# when combining linuxthreads with a failed execv call: see
|
||||
# http://bugs.python.org/issue4970.
|
||||
USING_LINUXTHREADS = False
|
||||
if threading:
|
||||
info = threading._info()
|
||||
try:
|
||||
pthread_version = info['pthread_version']
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
USING_LINUXTHREADS = pthread_version.startswith("linuxthreads")
|
||||
if hasattr(sys, 'thread_info') and sys.thread_info.version:
|
||||
USING_LINUXTHREADS = sys.thread_info.version.startswith("linuxthreads")
|
||||
else:
|
||||
USING_LINUXTHREADS = False
|
||||
|
||||
# Tests creating TESTFN
|
||||
class FileTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue