aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@midokura.com>2023-06-23 03:26:10 +0900
committerGitHub <noreply@github.com>2023-06-22 11:26:10 -0700
commitd8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9 (patch)
tree9f7ed8410b45c165ef8d930890d863fd9a252110 /Python/thread_pthread.h
parent13237a2da846efef9ce9b93fd4bcfebd49933568 (diff)
downloadcpython-d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9.tar.gz
cpython-d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9.zip
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/thread_pthread.h')
-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 76d6f3bcdf9..f96c57da646 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