Skip to content

Commit bb91678

Browse files
committed
gh-152798: Return 'pymutex' on POSIX except Windows/WASI
1 parent 8b1dbb1 commit bb91678

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Python/thread.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,20 @@ PyThread_GetInfo(void)
334334

335335
#ifdef HAVE_PTHREAD_STUBS
336336
value = Py_NewRef(Py_None);
337+
#else
338+
#ifdef MS_WINDOWS
339+
value = Py_NewRef(Py_None);
340+
#elif defined(__wasi__)
341+
value = Py_NewRef(Py_None);
337342
#else
338343
value = PyUnicode_FromString("pymutex");
339344
if (value == NULL) {
340345
Py_DECREF(threadinfo);
341346
return NULL;
342347
}
343348
#endif
349+
#endif
350+
344351
PyStructSequence_SET_ITEM(threadinfo, pos++, value);
345352

346353
#if (defined(_POSIX_THREADS) && defined(HAVE_CONFSTR) \
@@ -361,7 +368,6 @@ PyThread_GetInfo(void)
361368
return threadinfo;
362369
}
363370

364-
365371
void
366372
_PyThread_FiniType(PyInterpreterState *interp)
367373
{

0 commit comments

Comments
 (0)