diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-17 22:31:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 22:31:17 (GMT) |
commit | e903c16a6c3fe0adb594f93acc56e719590c4790 (patch) | |
tree | cd0157d07fe1e1aa75d948825a53d38a9f5e0796 /Python | |
parent | 941ac1e19df176b68537f3d952a70f0e52659bf6 (diff) | |
download | cpython-e903c16a6c3fe0adb594f93acc56e719590c4790.zip cpython-e903c16a6c3fe0adb594f93acc56e719590c4790.tar.gz cpython-e903c16a6c3fe0adb594f93acc56e719590c4790.tar.bz2 |
[3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834)
(cherry picked from commit d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9)
Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/thread_pthread.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 76d6f3b..f96c57d 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -356,7 +356,15 @@ PyThread_exit_thread(void) { if (!initialized) exit(0); +#if defined(__wasi__) + /* + * wasi-threads doesn't have pthread_exit right now + * cf. https://github.com/WebAssembly/wasi-threads/issues/7 + */ + abort(); +#else pthread_exit(0); +#endif } #ifdef USE_SEMAPHORES |