Remove comment from pystate created in 2003 (#123259)

This commit is contained in:
Anthony Shaw 2024-08-25 06:36:42 +10:00 committed by GitHub
parent ca18ff2a34
commit 86f06cb3fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 5 deletions

View File

@ -2802,16 +2802,11 @@ PyGILState_Release(PyGILState_STATE oldstate)
} }
/* We must hold the GIL and have our thread state current */ /* We must hold the GIL and have our thread state current */
/* XXX - remove the check - the assert should be fine,
but while this is very new (April 2003), the extra check
by release-only users can't hurt.
*/
if (!holds_gil(tstate)) { if (!holds_gil(tstate)) {
_Py_FatalErrorFormat(__func__, _Py_FatalErrorFormat(__func__,
"thread state %p must be current when releasing", "thread state %p must be current when releasing",
tstate); tstate);
} }
assert(holds_gil(tstate));
--tstate->gilstate_counter; --tstate->gilstate_counter;
assert(tstate->gilstate_counter >= 0); /* illegal counter value */ assert(tstate->gilstate_counter >= 0); /* illegal counter value */