The idea to keep the lock scope as tight as possible is the right one. That said, I would have assumed that

```
s.closeMu.Lock()
defer s.closeMu.Unlock()
if s.isClosed {
    return
}
s.isClosed = true
```

would at runtime be as tight as the hand-written unlocks due to the explicit return branch. Is this not the case in practice (I'm showing my lack of knowledge about how `defer` is implemented under the covers)?