'Process the work unit, or wait for sentinel to exit'

def run(self):

    while 1:
        self.running = True
        workunit = self._workq.get()
        if is_sentinel(workunit):
            break
        workunit.process()
    self.running = False
