Skip to content

Remove comment from pystate created in 2003 #123259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2379,16 +2379,11 @@ PyGILState_Release(PyGILState_STATE oldstate)
}

/* 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)) {
_Py_FatalErrorFormat(__func__,
"thread state %p must be current when releasing",
tstate);
}
assert(holds_gil(tstate));
--tstate->gilstate_counter;
assert(tstate->gilstate_counter >= 0); /* illegal counter value */

Expand Down
Loading