def cleanup(): shutdown_loop(loop) event_loop_policy.set_event_loop(old_loop)
def _stop(self): self.loop.stop() shutdown_loop(self.loop)