def interrupt(self):
        """Force the generator to stop running.
        """
        if self.is_alive():
            gobject.source_remove(self._idle_id)
            self._idle_id = 0
Force the generator to stop running.
        
recipes/Python/327082_Pseudo_threads_generators/recipe-327082.py