def __init__(self,qIn,qOut):
        """
        qIn in a Queue.Queue that store jobs to be done
        qOut is a Queue.Queue that store result of completed jobs
        The GuiPart is supposed to push stuff in qIn ,and regularly check
        if new result are available in qOut
        """
        self.qIn=qIn
        self.qOut=qOut
        self.jobCounter=0
        self.currentJobId=None
        self.xml=gtk.glade.XML("threadExample.glade")
        self.timeoutHandler=gtk.timeout_add(100,self.processOutcoming)
        
        dic={"on_quitButton_clicked":self.quitButton_clicked,
             "on_goButton_clicked":self.goButton_clicked,
             "on_entry1_activate":self.goButton_clicked,
             "on_window1_destroy_event":self.endApplication,
             "on_window1_delete_event":self.window1_delete
             }
        self.xml.signal_autoconnect(dic)


        self.treeview1=self.xml.get_widget('treeview1')
        #TreeStore column: job id, job label, status
        self.treestore1=gtk.TreeStore(int,str,str)
        self.treeview1.set_model(self.treestore1)
        
        cellLabel=gtk.CellRendererText()
        colLabel=gtk.TreeViewColumn('job')
        colLabel.pack_start(cellLabel,True)
        colLabel.add_attribute(cellLabel,'text',1)
        self.treeview1.append_column(colLabel)


        cellStatus=gtk.CellRendererText()
        colStatus=gtk.TreeViewColumn('status')
        colStatus.pack_start(cellStatus,True)
        colStatus.add_attribute(cellStatus,'text',2)
        self.treeview1.append_column(colStatus)

        self.progressbar1=self.xml.get_widget('progressbar1')

        qIn in a Queue.Queue that store jobs to be done
        qOut is a Queue.Queue that store result of completed jobs
        The GuiPart is supposed to push stuff in qIn ,and regularly check
        if new result are available in qOut
        
recipes/Python/409244_combining_GUasynchronous_IO_threads/recipe-409244.py