async def terminate ( self ) : self . proc . terminate ( ) await asyncio . wait_for ( self . proc . wait ( ) , self . kill_delay ) if self . proc . returncode is None : self . proc . kill ( ) await self . proc . wait ( ) await super ( ) . terminate ( )
forcefully quit python execution
Terminate a running script .
async def terminate(self):
        """Terminate a running script."""
        self.proc.terminate()

        await asyncio.wait_for(self.proc.wait(), self.kill_delay)
        if self.proc.returncode is None:
            self.proc.kill()
        await self.proc.wait()

        await super().terminate()