Re:Free-threaded CPython is ready to experiment with
by stavros on Friday July 12, 2024 @09:10PM
(#40950942)
Hmm, that's interesting, thank you. I didn't realize extensions can control the GIL.
[ Parent
| on HN ]
Re:Free-threaded CPython is ready to experiment with
by dagenix on Friday July 12, 2024 @09:57PM
(#40951158)
Yup, I think its described here: https://docs.python.org/3/c-api/init.html#releasing-the-gil-....
My understanding, is that many extensions will release the GIL when doing anything expensive. So, if you are doing CPU or IO bound operations in an extension _and_ you are calling that operation in multiple threads, even with the GIL you can potentially fully utilize all of the CPUs in your machine.