From: Victor Stinner Date: Thu, 6 Nov 2025 15:10:39 +0000 (+0100) Subject: gh-134745: Use "pymutex" for sys.thread_info on Windows (#141140) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e5e6fd380eb747bffeac151ca6f609779ef36f3;p=thirdparty%2FPython%2Fcpython.git gh-134745: Use "pymutex" for sys.thread_info on Windows (#141140) --- diff --git a/Python/thread.c b/Python/thread.c index 18c4af7f634c..0365f977d82b 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -334,14 +334,12 @@ PyThread_GetInfo(void) #ifdef HAVE_PTHREAD_STUBS value = Py_NewRef(Py_None); -#elif defined(_POSIX_THREADS) +#else value = PyUnicode_FromString("pymutex"); if (value == NULL) { Py_DECREF(threadinfo); return NULL; } -#else - value = Py_NewRef(Py_None); #endif PyStructSequence_SET_ITEM(threadinfo, pos++, value);