def wait_for_workers(workers, task_queue):
    """
        Waits for all workers to finish
    """
    for w in workers:
        task_queue.put(None)
    for w in workers:
        w.join()
    task_queue.close()
