Code Room
Code reviewHard
Question
Review this C# cache that serializes refreshes with a lock.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
private readonly object _gate = new object();private Data _data; public async Task<Data> GetAsync() { lock (_gate) { if (_data != null) return _data; _data = await FetchFromNetworkAsync(); // refresh return _data; }}Run or narrate your approach, then ask the coach.