4 ms·
Do you think in a decade or so, most popular Python dependencies will work well enough no-GIL for multithreading to be a bit less terrible?
by LoganDark 2y ago
Do you think in a decade or so, most popular Python dependencies will work well enough no-GIL for multithreading to be a bit less terrible?
- mabster 2y agoI think we will get there in the end but it will be slow. When I was doing performances stuff: Intel was our main platform and memory consistency was stronger there. We would try to write platform-agnostic multi threading code (in our case, typically spin-locks) but without testing properly on the other platforms, we would make mistakes and end up with race conditions, accessing unsynchronized data, etc. I think Python will be the same deal. With Python being GIL'd through most of its life cycle bits and pieces won't work properly, multi-threaded until we fix them.
- mylons 2y agothere’s already a PEP to address the GIL. python is going through its JVM optimization phase. it’s too popular and ubiquitous that improving the GIL and things like it are inevitable
- LoganDark 2y agoThere's not just a PEP, CPython already can be compiled in No-GIL mode. All we need is support from modules.