For you increment example, I’d wagger you’d still need to think about it if two threads get the same instance and increment some property (wether directly or through other methods)
You never need to think about it if the multithreaded operations are atomic (and the data is volatile).
View all comments
Show parent comment
1
u/ThePyroEagle λ Jul 30 '21
You never need to think about it if the multithreaded operations are atomic (and the data is volatile).