| OLD | NEW |
| 1 import 'dart:async'; | 1 import 'dart:async'; |
| 2 main() { | 2 main() { |
| 3 print('main #1 of 2'); | 3 print('main #1 of 2'); |
| 4 runAsync(() => print('runAsync #1 of 3')); | 4 scheduleMicrotask(() => print('microtask #1 of 3')); |
| 5 | 5 |
| 6 new Future.delayed(new Duration(seconds:1), | 6 new Future.delayed(new Duration(seconds:1), |
| 7 () => print('future #1 (delayed)')); | 7 () => print('future #1 (delayed)')); |
| 8 | 8 |
| 9 new Future(() => print('future #2 of 4')) | 9 new Future(() => print('future #2 of 4')) |
| 10 .then((_) => print('future #2a')) | 10 .then((_) => print('future #2a')) |
| 11 .then((_) { | 11 .then((_) { |
| 12 print('future #2b'); | 12 print('future #2b'); |
| 13 runAsync(() => print('runAsync #0 (from future #2b)')); | 13 scheduleMicrotask(() => print('microtask #0 (from future #2b)')); |
| 14 }) | 14 }) |
| 15 .then((_) => print('future #2c')); | 15 .then((_) => print('future #2c')); |
| 16 | 16 |
| 17 runAsync(() => print('runAsync #2 of 3')); | 17 scheduleMicrotask(() => print('microtask #2 of 3')); |
| 18 | 18 |
| 19 new Future(() => print('future #3 of 4')) | 19 new Future(() => print('future #3 of 4')) |
| 20 .then((_) => new Future( | 20 .then((_) => new Future( |
| 21 () => print('future #3a (a new future)'))) | 21 () => print('future #3a (a new future)'))) |
| 22 .then((_) => print('future #3b')); | 22 .then((_) => print('future #3b')); |
| 23 | 23 |
| 24 new Future(() => print('future #4 of 4')); | 24 new Future(() => print('future #4 of 4')); |
| 25 runAsync(() => print('runAsync #3 of 3')); | 25 scheduleMicrotask(() => print('microtask #3 of 3')); |
| 26 print('main #2 of 2'); | 26 print('main #2 of 2'); |
| 27 } | 27 } |
| OLD | NEW |