'This overrides the Thread.run method.
This method checks in an endless loop if new tasks are available
in the queue and processes them.'

def run(self):

    while True:
        if self.pool.name:
            self.idle = True
        try:
            task = self._queue.get(timeout=60)
            if self.pool.name:
                self.idle = False
            try:
                if (task == STOP_MESSAGE):
                    return
                self.ProcessTask(*task)
            finally:
                self._queue.task_done()
        except Queue.Empty:
            if self._RemoveFromPool():
                return
        if (((time.time() - self.started) > 600) and self._RemoveFromPool()):
            return
