def __call_gen(self, method, *args, **keys):
        """If the generator exits, discard it and call `_handle_exit()`."""
        if not self.stopped():
            try:
                return method(*args, **keys)
            except StopIteration:
                return self._handle_exit(True)
            except:
                return self._handle_exit(False)
        elif self.__exc_handler is None: raise StopIteration()
        else: return None
If the generator exits, discard it and call `_handle_exit()`.
recipes/Python/576965_Multicontext_eg_asynchronous_inline/recipe-576965.py