// returns and is removed, but the caller of f thinks it's now active. In other words, there
// should be one source of truth for what should be running.
s.lock.Lock()
defer s.lock.Unlock()
for key, cancel := range s.cancels {
if _, ok := target[key]; !ok {
cancel()