def runWorker(mapURL, threads):
	queue = Queue.Queue()

	# create a thread pool and give them a queue
	for i in range(threads):
		t = Worker(queue, str(i))
		t.setDaemon(True)
		t.start()

	# give the queue some data
	for url in mapURL.values():
		queue.put(url)

	# wait for the queue to finish
	queue.join()