🌐
Anthony Shaw
tonybaloney.github.io › posts › sub-interpreter-web-workers.html
Running Python Parallel Applications with Sub Interpreters
November 17, 2023 - class SubinterpreterWorker(threading.Thread): def __init__(self, number: int, config: Config, sockets: Sockets): self.worker_number = number self.interp = interpreters.create() self.channel = channels.create() self.config = config # TODO copy other parameters from config self.sockets = sockets super().__init__(target=self.run, daemon=True) def run(self): # Convert insecure sockets to a tuple of tuples because the Sockets type cannot be shared insecure_sockets = [] for s in self.sockets.insecure_sockets: insecure_sockets.append((int(s.family), int(s.type), s.proto, s.fileno())) interpreters.run
🌐
ThinhDA
thinhdanggroup.github.io › subinterpreter
Python 3.12 Subinterpreters: A New Era of Concurrency - ThinhDA
September 23, 2023 - This blog post will introduce you to the exciting new feature in Python 3.12 - Subinterpreters. We’ll start by explaining what subinterpreters are, their history, and how they compare to threads, processes, and greenlets. From there, we’ll delve into why subinterpreters were introduced, ...
🌐
Readthedocs
pythondev.readthedocs.io › subinterpreters.html
Python Subinterpreters — Unofficial Python Development (Victor's notes) documentation
_xxsubinterpreters.run_string(): release the GIL: https://github.com/python/cpython/commit/fb2c7c4afbab0514352ab0246b0c0cc85d1bba53 · subprocess: close_fds=False, posix_spawn() is safe in subinterpreters
🌐
GitHub
github.com › jsbueno › extrainterpreters
GitHub - jsbueno/extrainterpreters: Utilities for using Python's PEP 554 subinterpreters
Utilities for using Python's PEP 554 subinterpreters - jsbueno/extrainterpreters
Starred by 122 users
Forked by 8 users
Languages   Python 96.8% | C 3.2% | Python 96.8% | C 3.2%
🌐
Vstinner
vstinner.github.io › isolate-subinterpreters.html
Isolate Python Subinterpreters — Victor Stinner blog 3
December 27, 2020 - It should ease the development of isolated subinterpreters. It will be removed once subinterpreters will be fully isolated (once each interpreter will have its own GIL). Types declared in Python (class MyType: ...) are always "heap types": types dynamically allocated on the heap memory.
🌐
GitHub
gist.github.com › sterin › 61561c3139dd49da1f43
An example showing how to use sub interpreters and threads in Python · GitHub
I've updated the example for Python 3.3 at https://github.com/sterin/python-sub-interpreters-multiple-threads-example Try that as well.
🌐
GitHub
github.com › ericsnowcurrently › multi-core-python
GitHub - ericsnowcurrently/multi-core-python: Enabling CPython multi-core parallelism via subinterpreters.
Enabling CPython multi-core parallelism via subinterpreters. - ericsnowcurrently/multi-core-python
Starred by 247 users
Forked by 6 users
🌐
GitHub
github.com › ChillFish8 › python12-subinterpreters
GitHub - ChillFish8/python12-subinterpreters: Some simple and hopefully safe-ish bindings to Python 3.12's sub-interpreters.
from subinterpreters import create_interpreter, SubInterpreter new: SubInterpreter = create_interpreter( # Some optional config options to mess with: # allow_exec=False, # allow_fork=False, # allow_threads=True, # allow_daemon_threads=False, ) new.run_code( """ import random print(random.randint(1, 10)) """ ) # You can pass globals and locals new.run_code( """ import random print(random.randint(1, 10)) """, globals=globals(), locals=locals(), )
Author   ChillFish8
🌐
GitHub
github.com › sterin › python-sub-interpreters-multiple-threads-example
GitHub - sterin/python-sub-interpreters-multiple-threads-example: A simple example for using Python sub interpreters and multiple threads.
A simple example for using Python sub interpreters and multiple threads. - sterin/python-sub-interpreters-multiple-threads-example
Starred by 30 users
Forked by 6 users
Languages   C++ 91.7% | CMake 8.3% | C++ 91.7% | CMake 8.3%
Find elsewhere
🌐
GitHub
github.com › ericsnowcurrently › multi-core-python › issues › 69
Clarify what is a "sub-interpreter" and what is an "interpreter". · Issue #69 · ericsnowcurrently/multi-core-python
October 19, 2020 - PEP 554 is entitled "Multiple Interpreters in the Stdlib", yet the term "subinterpreters" is used throughout this repo. There is the additional confusion of the C struct names. It seems to me that the C struct PyInterpreterState correspo...
Author   markshannon
🌐
GitHub
github.com › vstinner › pythondev › blob › main › subinterpreters.rst
pythondev/subinterpreters.rst at main · vstinner/pythondev
Effects of the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro: Good things! Per-interpreter GIL!!! Use a TSS to get the current Python thread state ('tstate')
Author   vstinner
🌐
GitHub
github.com › conda › conda › issues › 15481
Use subinterpreters for better concurrency on Python 3.14 · Issue #15481 · conda/conda
December 6, 2025 - conda 0 0.0768s Modules in subinterpreter conda.sys_modules: 401 True conda 1 0.0002s · In Python 3.14 each subinterpreter has its own GIL, meaning we can make better use of multiple processors on a system.
Author   dholth
🌐
GitHub
github.com › Sleemanmunk › python_subinterpreters_example
GitHub - Sleemanmunk/python_subinterpreters_example: An example project of how to use subinterpreters in the lastest version of the Python C API without threads
An example project of how to use subinterpreters in the lastest version of the Python C API without threads - Sleemanmunk/python_subinterpreters_example
Author   Sleemanmunk
🌐
Real Python
realpython.com › python312-subinterpreters
Python 3.12 Preview: Subinterpreters – Real Python
May 3, 2024 - In the case of most Python users, CPython is the interpreter you’re running. A subinterpreter is a copy of the full CPython interpreter that can run independently from the main interpreter that started alongside your program.
🌐
GitHub
github.com › python › cpython › issues › 138045
Python 3.13 breaks circular imports through single-phase extension modules using non-isolated subinterpreters · Issue #138045 · python/cpython
August 22, 2025 - Python 3.13 breaks circular imports through single-phase extension modules using non-isolated subinterpreters#138045
Author   marcan
🌐
GitHub
github.com › tonybaloney › cpython › tree › subinterpreters
GitHub - tonybaloney/cpython at subinterpreters
The final step is to build the actual interpreter, using the information collected from the instrumented one. The end result will be a Python binary that is optimized; suitable for distribution or production installation.
Starred by 25 users
Forked by 9 users
Languages   Python 63.6% | C 34.5% | C++ 0.6% | M4 0.4% | HTML 0.4% | Batchfile 0.1% | Python 63.6% | C 34.5% | C++ 0.6% | M4 0.4% | HTML 0.4% | Batchfile 0.1%
🌐
mliezun.com
mliezun.github.io › 2024 › 08 › 19 › cpython-subinterpreters.html
Finding and fixing a bug in Python subinterpreters
August 19, 2024 - Lately, I've been working with Python C-API. I wanted to use subinterpreters with their own GIL to unlock the performance gains promised by being able to execute many threads in parallel which was not possible before Python 3.12.
🌐
GitHub
github.com › python › cpython › issues › 84694
[subinterpreters] Add --experimental-isolated-subinterpreters build option · Issue #84694 · python/cpython
May 5, 2020 - assignee = None closed_at = <Date 2020-10-31.22:59:17.920> created_at = <Date 2020-05-05.13:13:51.880> labels = ['expert-subinterpreters', 'build', '3.10'] title = '[subinterpreters] Add --experimental-isolated-subinterpreters build option' updated_at = <Date 2020-10-31.22:59:17.920> user = 'https://github.com/vstinner' bugs.python.org fields: activity = <Date 2020-10-31.22:59:17.920> actor = 'vstinner' assignee = 'none' closed = True closed_date = <Date 2020-10-31.22:59:17.920> closer = 'vstinner' components = ['Build', 'Subinterpreters'] creation = <Date 2020-05-05.13:13:51.880> creator = 'v
Author   vstinner
🌐
GitHub
github.com › pythonnet › pythonnet › issues › 2333
Support for creating python sub-interpreters · Issue #2333 · pythonnet/pythonnet
February 29, 2024 - One of the most exciting features of Python 3.12 is the possibility of creating sub-interpreters programmatically, each with an independent per-interpreter lock. This feature relies on a new C API function Py_NewInterpreterFromConfig. Ne...
Author   glopesdev