'Repeatedly process the job queue until told to exit.'

def run(self):

    while (not self._dismissed.isSet()):
        request = self.workRequestQueue.get()
        if self._dismissed.isSet():
            self.workRequestQueue.put(request)
            break
        try:
            self.resultQueue.put((request, request.callable(*request.args, **request.kwds)))
        except:
            request.exception = True
            import traceback
            self.resultQueue.put((request, traceback.format_exc()))
