code: func (s *MatcherSession) Close() {
  	s.closer.Do(func() {
  		// Signal termination and wait for all goroutines to tear down
  		close(s.quit)
  		time.AfterFunc(time.Second, func() { close(s.kill) })
  		s.pend.Wait()
  	})
  }
docs: // Close stops the matching process and waits for all subprocesses to terminate
  // before returning. The timeout may be used for graceful shutdown, allowing the
  // currently running retrievals to complete before this time.