def run(self):
        """Process the work unit, or wait for sentinel to exit"""
        while True:
            self.running = True
            workunit = self._workq.get()
            if is_sentinel(workunit):
                # Got sentinel
                break

            # Run the job / sequence
            workunit.process()
        self.running = False
def run ( self ) : while True : self . running = True workunit = self . _workq . get ( ) if is_sentinel ( workunit ) : break workunit . process ( ) self . running = False
Process the work unit, or wait for sentinel to exit