Talk Python To Me cover image

Talk Python To Me

#447: Parallel Python Apps with Sub Interpreters

Feb 3, 2024
Eric Snow and Anthony Shaw discuss the exciting developments in Python, such as sub-interpreters, Faster CPython, async work, and the adoption of typing. They explore the concept of subinterpreters in Python processes, highlighting the benefits of isolation and enabling concurrency. The discussion also touches on consolidating global state, using sub interpreters as an API for concurrent futures, managing Python processes with sub interpreters, and implementing multi-phase init in extension modules to support sub-interpreters in Python.
01:11:09

Podcast summary created with Snipd AI

Quick takeaways

  • Python has introduced sub-interpreters, allowing for isolation and parallelization of code, promising more efficient and scalable applications.
  • The Faster CPython initiative, sub-interpreters, and optimization methods are contributing to Python's performance improvements.

Deep dives

Python's new isolation and parallelization capability through sub-interpreters

Python has introduced a new capability called sub-interpreters, which allows for isolation and parallelization of Python code. Sub-interpreters are separate instances of the Python runtime that can run concurrently and independently, each with its own global state. This capability has been eagerly anticipated and has now become a reality with the inclusion of sub-interpreters in Python 3.12. Sub-interpreters offer exciting possibilities for concurrency and parallelism, opening doors for more efficient and scalable Python applications.

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner