def stopService(self):
        if self._task and self._task.running: self._task.stop()
        while not self.writing.called:
            time.sleep(1) #block the reactor
        Service.stopService(self)

# module state globals
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/services/graphite.py/Graphite.stopService/original