4 ms·
Yikes, C extensions can't assume they are under GIL by default: https://github.com/colesbury/numpy/commits/v1.19.3-nogil https://github.com/colesbury/numpy/com
by mzs 5y ago
Yikes, C extensions can't assume they are under GIL by default:
https://github.com/colesbury/numpy/commits/v1.19.3-nogil https://github.com/colesbury/numpy/commits/v1.19.3-nogil
- kzrdude 5y agoIt looks like a total of four lines needed changing in numpy due to his change. That's a very good score in my book, numpy is huge.
- Jweb_Guru 5y agoUnfortunately, every C extension will need to undergo manual review for safety, unless there's some very easy way to have the C extension opt into using the GIL. And some of them will be close to impossible to detangle in this way.
- veryupwork 5y agono
- int_19h 5y agoIt really depends on how the library is written, and how much shared data it has. It has been very common to use GIL as a general-purpose synchronization mechanism in native Python modules, since you have to pay that tax either way.