News for hackers. Stuff that matters.
Re:Data races in Python, despite the Global Interpreter Lock by verdagon on Monday February 21, 2022 @08:02PM (#30422886)
These things are running concurrently with each other though. Concurrent operations can happen one after the other, and Python's threads are more about concurrency than parallelism. If these definitions instead mentioned "simultaneous" or "in parallel", I could agree with your belief.

(Edited in response to your edit)

Re:Data races in Python, despite the Global Interpreter Lock by Kranar on Monday February 21, 2022 @09:05PM (#30423261)
There need not be any parallelism or simultaneity for a data race to occur. What matters is that writes occur concurrently with another read/write, not whether they occur in parallel.

For example it's possible on a single core CPU to have one thread operate on the higher bits of a 32-bit memory location then yield to second thread that operates on the lower 32-bits of the same memory location so that the end result is a clobbered write. At no point do the two threads run simultaneously and yet this would still be an example of a data race.

Python's GIL makes such an access impossible on any platform it runs on.