-
Notifications
You must be signed in to change notification settings - Fork 6
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
PEP for Per-Interpreter GIL #79
Comments
I'll probably work on separate PEPs for the following:
Likewise for the following separate work in the effort to help extensions support subinterpreters:
|
Note that, as with all PEPs, this won't be finished quickly. See faster-cpython/ideas#276 (comment). |
Yeah, that's a neat project. There shouldn't be any significant conflicts in the runtime design. Conceptually the projects coexist just fine. The real objective with per-interpreter GIL is maximum isolation between interpreters, where the GIL is essentially the last piece of state to isolate. That will remain even if the GIL is removed. Note, however, that one of the main benefits of interpreter isolation is that running code concurrently in different interpreters allows you to achieve true multi-core parallelism. That is also the main objective of the nogil project. The difference is in the concurrency model that each supports. For per-interpreter GIL it is something like CSP or the actor model. For nogil it is threading. Personally, I find the former to fit my brain much better than threading. (See PEP 554.) I suppose you could ask, "why would we need one if we have the other?" I'd say there is value to each. All that assumes that both projects are actually in a position to make it into CPython. 🙂 |
Hmm, maybe the PEP should emphasize isolation rather than the GIL... |
Idk how subinterpreters are spun up, but there are often use cases where using |
At this point it makes sense to have a PEP about the plan for a per-interpreter GIL. This will be a companion to PEP 554. The PEP will cover the following (but more focused than #77):
_PyRuntimeState
, use atomics, replace)__subclasses__
)_PyRuntimeState
toPyInterpreterState
PyInterpreterState
PyConfig
changesPyConfig
options:I'm not quite sure, but I'll probably post this PEP before we reach a conclusion on the immortal objects PEP.
The text was updated successfully, but these errors were encountered: