def __init__(self):
        """
        This start the gui in a asynchronous thread. We are in the "main" thread of the application, wich will later be used by the gui as well. We spawn a new thread for the worker.
        
        """
        gtk.threads_init()
        self.qIn=Queue.Queue()
        self.qOut=Queue.Queue()
        self.gui=GuiPart(self.qIn,self.qOut)
        self.running=True
        self.incomingThread=threading.Thread(target=self.processIncoming)
        #print "plop=",self.incomingThread
        self.incomingThread.setDaemon(True)
        self.incomingThread.start()
         #print "pika=",pika
        #gtk.threads_enter()
        gtk.main()
        self.running=False
        #gtk.threads_leave()

        This start the gui in a asynchronous thread. We are in the "main" thread of the application, wich will later be used by the gui as well. We spawn a new thread for the worker.
        
        
recipes/Python/409244_combining_GUasynchronous_IO_threads/recipe-409244.py