summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
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