executeAndWaitTasks method

Future<List<T>> executeAndWaitTasks(
  1. AsyncExecutor executor
)

Executes the tasks with executor, waits the executions and returns the tasks.

Implementation

Future<List<T>> executeAndWaitTasks(AsyncExecutor executor) async {
  var tasks = toList();
  var futureResults = executor.executeAll(this);
  await Future.wait(futureResults);
  return tasks;
}