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, ...
Videos
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
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
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%
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 › 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 › 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 › 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
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%
GitHub
github.com › sterin › python-sub-interpreters-multiple-threads-example › blob › master › main.cpp
python-sub-interpreters-multiple-threads-example/main.cpp at master · sterin/python-sub-interpreters-multiple-threads-example
A simple example for using Python sub interpreters and multiple threads. - sterin/python-sub-interpreters-multiple-threads-example
Author sterin
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