Skip to content

Instantly share code, notes, and snippets.

@iapicca
Last active April 4, 2024 17:22
Show Gist options
  • Save iapicca/83b784ff7d0c8345a599600584b1710f to your computer and use it in GitHub Desktop.
Save iapicca/83b784ff7d0c8345a599600584b1710f to your computer and use it in GitHub Desktop.
Future.wait behavior
void main() async {
final futures = [
for (var i = 0; i < 100000; ++i) Future.sync(DateTime.now),
];
final dateTimes = await Future.wait(futures);
final delta = dateTimes.last.difference(dateTimes.first);
print(delta.inMilliseconds);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment