We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1569700 commit ac3b2ceCopy full SHA for ac3b2ce
1 file changed
Modules/_testcapimodule.c
@@ -3325,13 +3325,14 @@ static void finalize_thread_hang_cleanup_callback(void *Py_UNUSED(arg)) {
3325
static PyObject *
3326
finalize_thread_hang(PyObject *self, PyObject *callback)
3327
{
3328
-#ifdef _POSIX_THREADS
+ // WASI builds some pthread stuff but doesn't have these APIs today?
3329
+#if defined(_POSIX_THREADS) && !defined(__wasi__)
3330
pthread_cleanup_push(finalize_thread_hang_cleanup_callback, NULL);
3331
#endif
3332
PyObject_CallNoArgs(callback);
3333
// Should not reach here.
3334
Py_FatalError("thread unexpectedly did not hang");
3335
3336
pthread_cleanup_pop(0);
3337
3338
Py_RETURN_NONE;
0 commit comments