def terminate(self):
        if self._process is not None:
            if self._process._popen is not None:
                self._process.terminate()

                import time
                # sleep and check job states a few times before we do a hard
                # kill
                for t in [0.01, 0.05, 0.10, 2, 3]:
                    time.sleep(t)
                    if not self.process.is_alive():
                        break

                if self.process.is_alive():
                    # kill it
                    import os
                    import signal
                    os.kill(self.process._popen.pid, signal.SIGKILL)
Terminate currently running blocks
dataset/ETHPy150Open thasso/pyjip/jip/tools.py/Block.terminate