def METHOD_NAME(self):
    proc_name = self.name
    while True:
        data = self.task_queue.get()
        if data is None:
            # Poison pill means shutdown
            print '%s: Exiting' % proc_name
            break
        try:
            result = self.commands[data[0]](**data[1])
        except:
            exc_type, exc_value, exc_traceback = sys.exc_info()
            fmt = traceback.format_exception(exc_type, exc_value,
                                             exc_traceback)
            result = fmt
        self.result_queue.put(result)
    return