CPython Runtime Internals (Free-Threading, Subinterpreters, JIT)

Parent: Programming Languages · researched 2026-06-01T01:53:34.056Z· 12 sources · 6 concepts · skill cpython-runtime-internals

> Reference file — part of the programming-languages hub. Authored via /dr (deep-research). Cross-refs: python-patterns (modern Python idioms) and nodejs-concurrency-internals (the parallel runtime-co

Overview

CPython Runtime Internals — Free-Threading, Subinterpreters, and the JIT

1. Shared runtime execution model (foundation)

2. PEP 703 — Free-threaded (no-GIL) build

3. C-extension free-threading compatibility

4. PEP 734 — Multiple interpreters in the stdlib (subinterpreters)

5. PEP 744 — Copy-and-patch JIT

6. Choosing a parallelism strategy

Anti-patterns

Troubleshooting

References

Children

Frontier under this node: C-extension free-thread compatibility (Py_mod_gil, Py_MOD_GIL_NOT_USED, PyUnstable_Module_SetGIL, cp314t wheels, ThreadSanitizer), Choosing free-threading vs subinterpreters vs multiprocessing vs asyncio, Copy-and-patch JIT (PEP 744 — tier-2 micro-ops, LLVM build-time stencils, --enable-experimental-jit, PYTHON_JIT), Free-threaded no-GIL build (PEP 703/779 — biased/deferred/per-thread refcounting, mimalloc/QSBR, PyMutex, stop-the-world GC, --disable-gil/python3.14t/PYTHON_GIL/sys._is_gil_enabled), Multiple interpreters / subinterpreters (PEP 734 concurrent.interpreters + Queue + InterpreterPoolExecutor; per-interpreter GIL PEP 684; PEP 554 predecessor), Shared runtime execution model (GIL, tier-1 specializing adaptive interpreter PEP 659, PyInterpreterState/PyThreadState, immortal objects PEP 683)

← the whole tree · 3D view· how to read this page