Skip to content

Commit ac3b2ce

Browse files
committed
more wasi workarounds.
if any more, i'll just skip the test on wasi.
1 parent 1569700 commit ac3b2ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/_testcapimodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,13 +3325,14 @@ static void finalize_thread_hang_cleanup_callback(void *Py_UNUSED(arg)) {
33253325
static PyObject *
33263326
finalize_thread_hang(PyObject *self, PyObject *callback)
33273327
{
3328-
#ifdef _POSIX_THREADS
3328+
// WASI builds some pthread stuff but doesn't have these APIs today?
3329+
#if defined(_POSIX_THREADS) && !defined(__wasi__)
33293330
pthread_cleanup_push(finalize_thread_hang_cleanup_callback, NULL);
33303331
#endif
33313332
PyObject_CallNoArgs(callback);
33323333
// Should not reach here.
33333334
Py_FatalError("thread unexpectedly did not hang");
3334-
#ifdef _POSIX_THREADS
3335+
#if defined(_POSIX_THREADS) && !defined(__wasi__)
33353336
pthread_cleanup_pop(0);
33363337
#endif
33373338
Py_RETURN_NONE;

0 commit comments

Comments
 (0)