Exemplo n.º 1
0
 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())
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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