File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3325,13 +3325,14 @@ static void finalize_thread_hang_cleanup_callback(void *Py_UNUSED(arg)) {
33253325static PyObject *
33263326finalize_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 ;
You can’t perform that action at this time.
0 commit comments