-
-
Save sergeykondr/848a8d66603e25bfe5b78985415c1d77 to your computer and use it in GitHub Desktop.
как будто обернули во фьюче и 1ую строчку вызвали сразу
This file contains 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
void main() async { | |
methodA(); | |
methodB(); //намеренно вызвано без await | |
methodA(); | |
} | |
methodA() { | |
print('A'); | |
} | |
methodB() async { | |
print('B start'); | |
Future.microtask(() { | |
print('microtask 1'); | |
}); | |
Future(() { | |
print('Future B'); | |
print('1'); | |
Future.microtask(() { | |
print('microtask 2'); | |
}); | |
Future(() { | |
print('Future DDDDB'); | |
}); | |
print('B end'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment