def _execute(self):
        """Check for exit, iterate once in a separate thread, and call `__finish()`."""
        if not self.stopped():
            try:
                threading.Thread(target=lambda:(self.next(), self.__finish())).start()
            except:
                self.throw(*exc_info())
Check for exit, iterate once in a separate thread, and call `__finish()`.
recipes/Python/576965_Multicontext_eg_asynchronous_inline/recipe-576965.py