def kill(self): """ tasklet.kill -- raise a TaskletExit exception for the tasklet. Note that this is a regular exception that can be caught. The tasklet is immediately activated. If the exception passes the toplevel frame of the tasklet, the tasklet will silently die. """ if not self.is_zombie: coroutine.kill(self) return self.raise_exception(TaskletExit, TaskletExit())
def kill(self): """ tasklet.kill -- raise a TaskletExit exception for the tasklet. Note that this is a regular exception that can be caught. The tasklet is immediately activated. If the exception passes the toplevel frame of the tasklet, the tasklet will silently die. """ if not self.is_zombie: coroutine.kill(self) _scheduler_remove(self) self.alive = False