Exemplo n.º 1
0
 def stop(self):
     """
     Stop the thread and cleanup.
     """
     log.info('stop mainloop')
     set_mainloop_running(False)
     main.wakeup()
     main.stop()
Exemplo n.º 2
0
 def __call__(self, *args, **kwargs):
     ret = self.func(*args, **kwargs)
     if self.loop.sleeping:
         main.wakeup()
     return ret