2 ms·
> C programs unavoidably interact directly with the GIL? Bingo. They don't have to, but often the point of C extensions is performance, which usually means tur
by kortex 3y ago
> C programs unavoidably interact directly with the GIL?
Bingo. They don't have to, but often the point of C extensions is performance, which usually means turning on parallelism. E.g. Numpy will release the GIL in order to use machine threads on compute-heavy tasks. I'm not worried about the big 5 (numpy, scipy, pandas, pytorch, and sklearn), they have enough support that they can react to a GILectomy. It's everyone else that touches the GIL but may not have the capacity or ability to update in a timely manner.
I don't think this is something which can be shimmed either or ABI-versioned either. It's deeeep and touches huge swaths of the cpython codebase.
- saltminer 3y agoThanks, that explains a lot. Sounds like a task that would have to be done in Python 4, if ever it exists.