Re:Data races in Python, despite the Global Interpreter Lock
by mirashii on Monday February 21, 2022 @09:21PM
(#30423355)
Let's try simpler:
No code that runs under the GIL is ever run concurrently. All of the code in the example holds the GIL, there's never any concurrency in your article! With no concurrency, there can be no data race.
The Wikipedia article quotes part of the C++ standard which defines "potentially concurrent", but even with that definition, the article's understanding of data race stands, because these two operations are indeed unsequenced w.r.t. each other.
I don't see a reason to depart from the usual understanding of "concurrent", but I'm open to being convinced!