Exemple #1
0
 def add(self, task_name: str, greenlet: gevent.Greenlet) -> None:
     greenlet.link_exception(self._handle_killed_greenlets)
     greenlet.task_name = task_name
     self.greenlets.append(greenlet)
Exemple #2
0
 def add(self, task_name: str, greenlet: gevent.Greenlet,
         exception_is_error: bool) -> None:
     greenlet.link_exception(self._handle_killed_greenlets)
     greenlet.task_name = task_name
     greenlet.exception_is_error = exception_is_error
     self.greenlets.append(greenlet)