gh-104530: Enable native Win32 condition variables by default (GH-104531)

This commit is contained in:
Andrew Rogers 2024-02-02 13:50:51 +00:00 committed by GitHub
parent d29f57f603
commit b3f0b698da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 41 additions and 35 deletions

View file

@ -610,8 +610,16 @@ PyEval_SaveThread(void)
void
PyEval_RestoreThread(PyThreadState *tstate)
{
#ifdef MS_WINDOWS
int err = GetLastError();
#endif
_Py_EnsureTstateNotNULL(tstate);
_PyThreadState_Attach(tstate);
#ifdef MS_WINDOWS
SetLastError(err);
#endif
}