wait method

Future<void> wait()

Implementation

Future<void> wait() async {
  try {
    await Future.wait(
      topLevelTasks.map((e) => e.future).whereType(),
      eagerError: true,
    );
  } catch (e) {
    logger.delayed('Error: $e');

    killAll();
  }
}