Created
September 8, 2019 15:53
-
-
Save mraleph/545e80fa9ba2d8361fd4abcfa47d9c12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> f() async { | |
print("f invoked"); | |
await Future.value(10); | |
print("f continued"); | |
} | |
Future<void> g() async { | |
print("g invoked"); | |
await Future.value(10); | |
print("g continued"); | |
} | |
h() async { | |
print("h invoked"); | |
final futures = [f(), g()]; | |
print("h continued"); | |
await Future.wait(futures); | |
print("h done"); | |
} | |
void main() { | |
h(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment