code: func (s *stateSync) run() {
  	s.err = s.loop()
  	close(s.done)
  }
docs: // run starts the task assignment and response processing loop, blocking until
  // it finishes, and finally notifying any goroutines waiting for the loop to
  // finish.