code: def stopService(self):
          
          Service.stopService(self)
          removeDestination(self)
          self._reactor.callFromThread(self._reactor.stop)
          return deferToThreadPool(
              self._mainReactor,
              self._mainReactor.getThreadPool(), self._thread.join)
docs: Stop the writer thread, wait for it to finish.