Currently as_completed(..., with_results=True) can generate many gather calls, which can overwhelm the scheduler a bit. We might instead batch these gather calls if many come in before other gather calls return. This would also help to avoid creating very many file descriptors.
Alternativley this could also be handled at a lower level in gather itself.
Currently
as_completed(..., with_results=True)can generate many gather calls, which can overwhelm the scheduler a bit. We might instead batch these gather calls if many come in before other gather calls return. This would also help to avoid creating very many file descriptors.Alternativley this could also be handled at a lower level in gather itself.