You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i guess we should clear to the readers that += in you specific example it is an atomic operation and if you run the code multiple times you will always the right answer Counter should be 500000, found 500000, because in 3.X version of python they were consistently made to be atomic and so i guess the code is misleading especially for new readers ! i can suggest other senarios where we will have data races if you will
The text was updated successfully, but these errors were encountered:
i guess we should clear to the readers that += in you specific example it is an atomic operation and if you run the code multiple times you will always the right answer
Counter should be 500000, found 500000
, because in 3.X version of python they were consistently made to be atomic and so i guess the code is misleading especially for new readers ! i can suggest other senarios where we will have data races if you willThe text was updated successfully, but these errors were encountered: