1 2 3 4 5 6 7
defer func() { estate.mu.Lock() // defer estate.mu.Unlock() estate.ops <- OpDestroy{Env:estate.name, Error: res} estate.mu.Unlock() }()