mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-104530: Enable native Win32 condition variables by default (GH-104531)
This commit is contained in:
parent
d29f57f603
commit
b3f0b698da
6 changed files with 41 additions and 35 deletions
|
@ -2488,7 +2488,17 @@ PyGILState_Check(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
return (tstate == gilstate_tss_get(runtime));
|
||||
#ifdef MS_WINDOWS
|
||||
int err = GetLastError();
|
||||
#endif
|
||||
|
||||
PyThreadState *tcur = gilstate_tss_get(runtime);
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
SetLastError(err);
|
||||
#endif
|
||||
|
||||
return (tstate == tcur);
|
||||
}
|
||||
|
||||
PyGILState_STATE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue