PyErlang -- a stepping stone towards behaviour-oriented concurrency in Python
summary
PyErlang implements direct sharing of deeply immutable Python objects across Python 3.12 sub‑interpreters by adding a dynamic freeze operation that enforces deep immutability by freeze and a self‑containedness check (freeze fails if unrelated aliases or module state can witness the change). Implementation uses atomic reference counting for frozen groups and an SCC‑based cycle grouping that collapses strongly connected components to a single refcount, and the current branch hits ~146 insertion sites for the immutability check.
AI-written summary · about
chapters (9)
- 0:00PyErlang introduction
- 4:44The global interpreter lock in Python
- 14:45Sub-interpreters for parallelism
- 21:09Behaviour-oriented concurrency
- 35:12PyErlang design
- 37:40Deep immutability in Python
- 1:06:30Immutability implementation stages
- 1:17:03Implementation challenges
- 1:20:34Conclusion and future
related talks
19mDynamically Checked Deep Immutability in Python
31mIntroducing Immortal Objects: Building Block Towards a Multi-core Python Runtime
35mPEP 683: Immortal Objects - A new approach for memory managing
42mConcurrency Oriented Software
38mImmutability is everything!
39mConcurrent Languages are Functional
23mMemoirs of a Python Object: Memory Management and Improving Performance
15mExtending Python Into the Future
