summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@midokura.com>2023-06-22 18:26:10 (GMT)
committerGitHub <noreply@github.com>2023-06-22 18:26:10 (GMT)
commitd8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9 (patch)
tree9f7ed8410b45c165ef8d930890d863fd9a252110 /Python
parent13237a2da846efef9ce9b93fd4bcfebd49933568 (diff)
downloadcpython-d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9.zip
cpython-d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9.tar.gz
cpython-d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9.tar.bz2
gh-101538: Add experimental wasi-threads build (#101537)
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.h8
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