2 ms·
Important to note that this is different from the nogil project ( https://github.com/colesbury/nogil https://github.com/colesbury/nogil ) - this is about the fe
by simonw 4y ago
Important to note that this is different from the nogil project ( https://github.com/colesbury/nogil https://github.com/colesbury/nogil ) - this is about the feature that's landing soon in Python 3.12 which will allow multiple Python sub-interpreters each with their own GIL - hence enabling Python code to run multi-threaded in the same process, albeit with a fair amount of extra work to co-ordinate between those different interpreters.
The tutorial itself is fantastic - it's not an easy feature to try out right now but I got there by following the step-by-step instructions.
Also interesting is this project, linked to from the end of the tutorial: https://github.com/jsbueno/extrainterpreters https://github.com/jsbueno/extrainterpreters
Posted my own set of short notes on my blog: https://simonwillison.net/2023/May/15/per-interpreter-gils/ https://simonwillison.net/2023/May/15/per-interpreter-gils/