agent/utils/sync/sequential_waitgroup.go
func (s *SequentialWaitGroup) Done(sequence int64) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	_, ok := s.semaphores[sequence]
	if ok {
		s.semaphores[sequence]--
		if s.semaphores[sequence] == 0 {
			delete(s.semaphores, sequence)
			s.change.Broadcast()
		}
	}
}
func (s *SequentialWaitGroup) Done(sequence int64) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	_, ok := s.semaphores[sequence]
	if ok {
		s.semaphores[sequence]--
		if s.semaphores[sequence] == 0 {
			delete(s.semaphores, sequence)
			s.change.Broadcast()
		}
	}
}
// Done decrements the waitgroup at the given sequence by one