8000 PEP 684: Add a PEP for making the GIL per-interpreter by ericsnowcurrently · Pull Request #2387 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

PEP 684: Add a PEP for making the GIL per-interpreter #2387

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a note about the allocators.
  • Loading branch information
ericsnowcurrently committed Mar 8, 2022
commit ed4e05d18fe988f9075132128e8e8c44522002ee
19 changes: 10 additions & 9 deletions pep-0684.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,13 @@ The following state will not be moved:
Also, a number of parts of the global state were already moved to the
interpreter, such as GC, warnings, and atexit hooks.

Memory Allocators
-----------------

<TBD>
Note that currently the allocators (see Objects/obmalloc.c) are shared
between all interpreters, protected by the GIL. They will need to move
to each interpreter (or a global lock will be needed). This is the
highest risk part of the work to isolate interpreters and may require
more than just moving fields down from ``_PyRuntimeState``. Some of
the complexity is reduced if CPython switches to a thread-safe
allocator like mimalloc.

.. _proposed capi:

Expand Down Expand Up @@ -585,14 +588,12 @@ Reference Implementation
Open Issues
===========

* what are the risks/hurdles involved with moving the allocators?
* add a helper to allow importing incompatible extensions?

Implementation details:

* explain sharing some global objects vs. sharing none of them?
* mention sharing the memory allocators?

Other:

* add a helper to allow importing incompatible extensions?


Deferred Functionality
Expand Down
0