only resolve when all running tasks are done