def periodicCall(self):
        """
        Check every 100 ms if there is something new in the queue.
        """
        self.gui.processIncoming()
        if not self.running:
            # This is the brutal stop of the system. You may want to do
            # some cleanup before actually shutting it down.
            import sys
            sys.exit(1)
        self.master.after(100, self.periodicCall)

        Check every 100 ms if there is something new in the queue.
        
recipes/Python/82965_Threads_Tkinter_asynchronous/recipe-82965.py