News for hackers. Stuff that matters.
Re:Data races in Python, despite the Global Interpreter Lock by Thorrez on Thursday February 24, 2022 @12:58AM (#30451001)
Consider the situation "counter = counter + get_value()". That also can be reasoned about in terms of smaller operations, but not more coarse operations, because the user could have just written the single operation.

We wouldn't expect this to be atomic, because the get_value() function could do tons of things, and we don't expect all that to be atomic. It doesn't make sense to call something atomic just because the user wrote it.

There are no comments on this comment yet.