4 ms·
> Multithreaded Python currently does not How do you prevent interleaving of different threads then? > and must remain that way to maintain compatibility. Wh
by needusername 5y ago
> Multithreaded Python currently does not
How do you prevent interleaving of different threads then?
> and must remain that way to maintain compatibility.
Why? Python 3 broke a whole lot of applications and libraries.
- pansa2 5y ago> How do you prevent interleaving of different threads then? The GIL. > Why? Python 3 broke a whole lot of applications and libraries. Sorry, I mean it must remain that way if it is to maintain compatibility. We’re assuming that breaking compatibility is unacceptable.
- needusername 5y ago> The GIL. How does the the GIL prevent interleaving? My understanding is that if an "operation" takes several steps, eg. reading from a dict then IO or a C extension and finally writing to a dict the GIL will not make this atomic.
- formerly_proven 5y agoMost Python 3 breakage was search-replace fixable (though I'd question the value of language changes falling in this category), although it is true that the text/bytes separation exposed unsound data models in some applications, which is of course nasty to deal with.
- needusername 5y agoWhy did it take projects and Google so long to migrate?