preallocated slices (#934)

This commit is contained in:
Till Knuesting
2019-11-11 00:03:51 +00:00
committed by Asim Aslam
parent c696a859be
commit 5ae3e179b9
10 changed files with 16 additions and 16 deletions

View File

@@ -111,7 +111,7 @@ func (m *Registry) ttlPrune() {
}
func (m *Registry) sendEvent(r *registry.Result) {
var watchers []*Watcher
watchers := make([]*Watcher, 0, len(m.Watchers))
m.RLock()
for _, w := range m.Watchers {