diff options
author | Christian Heimes <christian@python.org> | 2022-04-23 07:52:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-23 07:52:16 (GMT) |
commit | 9b5ca5405e5a2786b5b3acc0de578f80f8dc9e36 (patch) | |
tree | 2b9bbe7cbd0d10c15a459f37c91e17ac27e97dff /Lib/test/support/threading_helper.py | |
parent | 0daa99f68b7b9f02b37a2f34508f33ae66d95fc4 (diff) | |
download | cpython-9b5ca5405e5a2786b5b3acc0de578f80f8dc9e36.zip cpython-9b5ca5405e5a2786b5b3acc0de578f80f8dc9e36.tar.gz cpython-9b5ca5405e5a2786b5b3acc0de578f80f8dc9e36.tar.bz2 |
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781)
Diffstat (limited to 'Lib/test/support/threading_helper.py')
-rw-r--r-- | Lib/test/support/threading_helper.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/support/threading_helper.py b/Lib/test/support/threading_helper.py index 7b636f0..26cbc6f 100644 --- a/Lib/test/support/threading_helper.py +++ b/Lib/test/support/threading_helper.py @@ -222,12 +222,7 @@ def _can_start_thread() -> bool: support (-s USE_PTHREADS / __EMSCRIPTEN_PTHREADS__). """ if sys.platform == "emscripten": - try: - _thread.start_new_thread(lambda: None, ()) - except RuntimeError: - return False - else: - return True + return sys._emscripten_info.pthreads elif sys.platform == "wasi": return False else: |