Skip to content

per-interpreter: pending calls (from ceval state) #24

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

Closed
5 tasks done
ericsnowcurrently opened this issue Aug 24, 2018 · 7 comments
Closed
5 tasks done

per-interpreter: pending calls (from ceval state) #24

ericsnowcurrently opened this issue Aug 24, 2018 · 7 comments
Assignees
Labels
complexity: medium moderately hard to figure out P1 medium priority size: medium requires a moderate amount of changes type: enhancement X [isolation] improved interpreter isolation X [runtime] CPython runtime (lifecycle, state)

Comments

@ericsnowcurrently
Copy link
Owner

ericsnowcurrently commented Aug 24, 2018

(Note: this was reverted, so the underlying problem needs to be addressed and then the PR re-merged.)

Move PyRuntimeState.ceval.pending to PyInterpreterState.ceval.pending.

  • move pending calls from PyRuntimeState to PyInterpreterState
  • move eval "breaker" flag to PyInterpreterState
  • pass PyInterpreterState * to related macros (rather than rely on PyThreadState_Get())
  • sort out what "main" thread means, when per-interpreter
  • fix usage of Py_AddPendingCall()
@ericsnowcurrently ericsnowcurrently added X [isolation] improved interpreter isolation X [runtime] CPython runtime (lifecycle, state) P1 medium priority type: enhancement size: medium requires a moderate amount of changes complexity: medium moderately hard to figure out labels Aug 24, 2018
@ericsnowcurrently ericsnowcurrently changed the title pending calls (from ceval state) per-interpreter: pending calls (from ceval state) Aug 24, 2018
@ericsnowcurrently
Copy link
Owner Author

ericsnowcurrently commented Dec 11, 2018

@phmc
Copy link

phmc commented Nov 22, 2019

Just pinging here too: I've added some thoughts on the crash exposed by the pending calls changes on the bpo issue https://bugs.python.org/issue33608

@ericsnowcurrently
Copy link
Owner Author

Thanks! I'll take a look and respond over there. (Hopefully I can get to it today.)

@ericsnowcurrently
Copy link
Owner Author

FTR, this is effectively blocked by https://bugs.python.org/issue36476, "Runtime finalization assumes all other threads have exited."

@vstinner
Copy link
Collaborator

move eval "breaker" flag to PyInterpreterState

and

fix usage of Py_AddPendingCall()

Are fixed by python/cpython@50e6e99 : see https://bugs.python.org/issue39984

@vstinner
Copy link
Collaborator

Move PyRuntimeState.ceval.pending to PyInterpreterState.ceval.pending.

is done, so I close the issue.

@ericsnowcurrently
Copy link
Owner Author

Thanks @vstinner! I'm glad that at least this part of https://bugs.python.org/issue33608 has made it in. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium moderately hard to figure out P1 medium priority size: medium requires a moderate amount of changes type: enhancement X [isolation] improved interpreter isolation X [runtime] CPython runtime (lifecycle, state)
Projects
None yet
Development

No branches or pull requests

4 participants