def run_workers(self, proxies): threadPool = ThreadPool(len(proxies)) for proxy in proxies: threadPool.run(self.accept_proxy, callback=None, proxy=proxy) threadPool.killAllWorkers(None)
def run_workers(self, urls): threadPool = ThreadPool(len(urls)) for url in urls: threadPool.run(self.run_mario, callback=self.callback, url=url) threadPool.killAllWorkers(None)