by stingraycharles · 13y ago · 0 comments
You could also argue that read/write locks aren't legitimate applications (starvation, increased contention, alternate solutions).
You're passing in a non-const reference, so wherever that came from would be expected to change. However the object itself would not change. Your object would be at StateA regardless of who gets the mutex first.