diff --git a/tqdm/contrib/concurrent.py b/tqdm/contrib/concurrent.py index 70fd1f97..ccb5e125 100644 --- a/tqdm/contrib/concurrent.py +++ b/tqdm/contrib/concurrent.py @@ -58,7 +58,7 @@ def _executor_map(PoolExecutor, fn, *iterables, **tqdm_kwargs): """ kwargs = tqdm_kwargs.copy() if "total" not in kwargs: - kwargs["total"] = len(iterables[0]) + kwargs["total"] = length_hint(iterables[0]) tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) max_workers = kwargs.pop("max_workers", min(32, cpu_count() + 4)) chunksize = kwargs.pop("chunksize", 1)