3 ms·
I thought the point of No-GIL was to force users of python to provide proper locking.
by rowanG077 3y ago
I thought the point of No-GIL was to force users of python to provide proper locking.
- Jtsummers 3y agoTo achieve no-GIL, libraries and extensions along with the underlying language implementation will need to add in the proper locking. For users, it'll be mixed. Users writing single-threaded code shouldn't have to change a single line of code, but they'll see (sans the concurrent efforts to speed up the underlying implementation) slower performance due to everything done to achieve no-GIL (the actual net effect will be a performance boost due to that concurrent effort over time). If they're writing multi-threaded code, then they should be writing it to be threadsafe now, not assuming that the GIL will protect them (because it doesn't guarantee it now anyways). So nothing should actually change for most users of Python if they're writing correct code today.
- kortex 3y agoPython's reference counting garbage collector would also need concurrency controls.