def work(): while True: url = queue.get() Knight.crawl_page(threading.current_thread().name, url) queue.task_done()