Codebase list golang-github-go-kit-kit / dff50435-7a33-4f0c-bbdc-f455eb10d80a/v0.3.0
Merge pull request #392 from mishudark/patch-1 fix(generic.go): add defer to ApproximateMovingAverage mutext Peter Bourgon authored 7 years ago GitHub committed 7 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
207207 // ApproximateMovingAverage returns the approximate moving average of observations.
208208 func (h *SimpleHistogram) ApproximateMovingAverage() float64 {
209209 h.mtx.RLock()
210 h.mtx.RUnlock()
210 defer h.mtx.RUnlock()
211211 return h.avg
212212 }
213213