Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/tests/site/articles/event-loop/eventloop_test2/bin/eventloop_test2.dart

Issue 27412003: runAsync name change (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: add links to event loop article; add update date Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
OLDNEW
« no previous file with comments | « src/tests/site/articles/event-loop/eventloop_test1/bin/eventloop_test1.dart ('k') | src/tests/site/code/webui/build.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698