def __compute_with_threadpool(self, urls):
    start_time = datetime.utcnow()
    pool = ThreadPool(processes=8)
    pool.map(self.__get_size_of_file_in_parallel, urls)
    self.Log.info('Total size of all {0} URLs: {1}'.format(len(urls), sum(self.__sizes_by_file.values())))
    time_diff = (datetime.utcnow() - start_time)
    self.Log.info('Threadpool version took: {0}'.format(self.get_timespan(time_diff.seconds)))
def __compute_with_threadpool(self, urls):
    start_time = datetime.utcnow()
    pool = ThreadPool(processes=8)
    pool.map(self.__get_size_of_file_in_parallel, urls)
    self.Log.info('Total size of all {0} URLs: {1}'.format(len(urls), sum(self.__sizes_by_file.values())))
    time_diff = (datetime.utcnow() - start_time)
    self.Log.info('Threadpool version took: {0}'.format(self.get_timespan(time_diff.seconds)))