Will the _otherThing field below be protected by the locks?
class ThreadSafeThing
{
private readonly object _sync = new object();
private SomeOtherThing _otherThing;
public SomeOtherThing OtherThing { get { lock(_sync) return _otherThing; } }
public void UpdateOtherThing(SomeOtherThing otherThing)
{
lock(_sync) _otherThing = otherThing;
}
}