1 of 4

Multi-core Python

with Subinterpreters

Eric Snow

Python Summit Dec. 2018

2 of 4

  • (PEP 554) expose existing C-API in new stdlib module
  • (PEP 554) add basic mechanism to “share” data
  • stop sharing GIL between subinterpreters
  • build & optimize from there
  • ---
  • goal: PEP 554 in 3.8; maybe GIL-split too
  • 20% time at Microsoft
  • growing number of collaborators
  • strongly positive reaction at PyCon 2018

3 of 4

Pros:

  • human-oriented concurrency model (CSP)
  • true multi-core parallelism
  • most of effort provides standalone benefits

Cons:

  • risk in implementation
  • problems with extension modules
  • burden on extension module authors

4 of 4

https://github.com/ericsnowcurrently/multi-core-python