'This stops all the worker threads.'

@utils.Synchronized
def Stop(self):

    if (not self.started):
        logging.warning('Tried    to    stop    a    thread    pool    that    was    not    running.')
        return
    workers = self._workers.values()
    self._workers = {}
    self._workers_ro_copy = {}
    for _ in workers:
        self._queue.put(STOP_MESSAGE)
    self.started = False
    self.Join()
    for worker in workers:
        worker.join()
