Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 18, 2020

bpo-37127, bpo-39984:

  • trip_signal() and Py_AddPendingCall() now get the current Python
    thread state using PyGILState_GetThisThreadState() rather than
    _PyRuntimeState_GetThreadState() to be able to get it even if the
    GIL is released.
  • _PyEval_SignalReceived() now expects tstate rather than ceval.
  • Remove ceval parameter of _PyEval_AddPendingCall(): ceval is now
    get from tstate parameter.

https://bugs.python.org/issue39984

bpo-37127, bpo-39984:

* trip_signal() and Py_AddPendingCall() now get the current Python
  thread state using PyGILState_GetThisThreadState() rather than
  _PyRuntimeState_GetThreadState() to be able to get it even if the
  GIL is released.
* _PyEval_SignalReceived() now expects tstate rather than ceval.
* Remove ceval parameter of _PyEval_AddPendingCall(): ceval is now
  get from tstate parameter.
@vstinner
Copy link
Member Author

Py_AddPendingCall() and trip_signal() have an issue if the thread has no Python thread state. But this PR doesn't make the situation better or worse, the problem already existed before. See: https://bugs.python.org/issue37127#msg364543

@vstinner vstinner merged commit 8849e59 into python:master Mar 18, 2020
@vstinner vstinner deleted the pending_tstate branch March 18, 2020 18:29
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