Re:Data races in Python, despite the Global Interpreter Lock
by chrisseaton on Monday February 21, 2022 @08:46PM
(#30423148)
That's an implementation detail based on a particular architecture. A different architecture could have an atomic increment operation if it wanted to, and Python could use it for this syntax.
[ Parent
| on HN ]
Re:Data races in Python, despite the Global Interpreter Lock
by squeaky-clean on Monday February 21, 2022 @11:23PM
(#30423953)
In Python though, there's really only one architecture. Yes there's PyPy and such, but CPython and it's bytecode is both the official implementation and official spec of Python. Maybe the underlying hardware has those operations, but the Python VM does not.