code: func (s *Service) Stop(clearFutures bool) {
  	s.mutex.Lock()
  	defer s.mutex.Unlock()
  
  	// return if service not started
  	if atomic.LoadUint32(&s.state) != serviceStarted {
  		return
  	}
  
  	// kill and wait
  	s.tomb.Kill(nil)
  	s.tomb.Wait()
  
  	// clear futures if requested
  	if clearFutures {
  		s.futureStore.Protect(false)
  		s.futureStore.Clear()
  	}
  
  	// set state
  	atomic.StoreUint32(&s.state, serviceStopped)
  }
docs: // Stop will disconnect the client if online and cancel all futures if requested.
  // After the service is stopped in can be started again.
  //
  // Note: You should clear the futures on the last stop before exiting to ensure
  // that all goroutines return that wait on futures.