Skip to content

bpo-39984: _PyThreadState_DeleteCurrent() takes tstate #19051

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 1 commit into from
Mar 18, 2020
Merged

bpo-39984: _PyThreadState_DeleteCurrent() takes tstate #19051

merged 1 commit into from
Mar 18, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 18, 2020

  • _PyThreadState_DeleteCurrent() now takes tstate rather than
    runtime.
  • Add ensure_tstate_not_null() helper to pystate.c.
  • Add _PyEval_ReleaseLock() function.
  • _PyThreadState_DeleteCurrent() now calls
    _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after
    this call, not before.
  • PyGILState_Release(): rename "tcur" variable to "tstate".

https://bugs.python.org/issue39984

* _PyThreadState_DeleteCurrent() now takes tstate rather than
  runtime.
* Add ensure_tstate_not_null() helper to pystate.c.
* Add _PyEval_ReleaseLock() function.
* _PyThreadState_DeleteCurrent() now calls
  _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after
  this call, not before.
* PyGILState_Release(): rename "tcur" variable to "tstate".
@vstinner vstinner merged commit 23ef89d into python:master Mar 18, 2020
@vstinner vstinner deleted the tstate_delete_current branch March 18, 2020 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants