Yes to all three (i.e. read / write to the last).
But there is also:
You create a static lock object, while the data you protect is a field for each instance. This means that all instances of StringMe are protected from each other by events, although they have different data (i.e. _stringArrayList instances). In the above example, you can remove the static modifier with _locker . To be more precise, you usually define a “lock” for the data set or, even better, the invariants that you want to keep. Typically, the lifetime (and scope) of a lock should match the lifetime.
In addition, for a good assessment, you should not have a higher visibility of the protected data than from blocking. In your example, a derived implementation can change _stringArrayList (since it is protected) without acquiring a lock, thereby violating the invariant. I would make them private , and, if necessary, set _stringArrayList via (appropriately locking) methods to derived classes.
source share