Skip to content

Conversation

@ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Sep 15, 2018

This is part of the work to improve isolation between subinterpreters. We need a way for one interpreter to ask another interpreter to do small low-level tasks, like safely decref an object owned by the other interpreter. The existing Py_AddPendingCall() (part of the public C-API) is specific to the main interpreter, so we factor out a private per-interpreter _Py_AddPendingCall(). This involves moving the global "pending calls" state to PyInterpreterState.

As part of this change, we start tracking if each interpreter is "active" or finalizing. "Active" means that the interpreter is currently running the eval loop. We also start tracking the per-interpreter "active" thread ID rather than the global "main" thread ID.

https://bugs.python.org/issue33608

@ericsnowcurrently ericsnowcurrently changed the title bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). [WIP] bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). Sep 15, 2018
@ericsnowcurrently
Copy link
Member Author

Superceded by gh-11617

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.

4 participants