+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: Apache-2.0
+
package keepclient
import (
func RefreshServiceDiscovery() {
svcListCacheMtx.Lock()
defer svcListCacheMtx.Unlock()
+ var wg sync.WaitGroup
for _, ent := range svcListCache {
- ent.clear <- struct{}{}
+ wg.Add(1)
+ go func() {
+ ent.clear <- struct{}{}
+ wg.Done()
+ }()
}
+ wg.Wait()
}
// ClearCacheOnSIGHUP installs a signal handler that calls