Skip to content

Commit 3dbe9a4

Browse files
committed
dart-lang#1363. Excessive delays removed
1 parent 8e05690 commit 3dbe9a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Language/Statements/For/Asynchronous_For_in/enclosing_loop_t01.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Future test2() async {
4545
} else if (!streamController.isClosed) {
4646
streamController.close();
4747
}
48-
await new Future.delayed(new Duration(microseconds: 100));
48+
await null;
4949
}
5050
}
5151
Expect.listEquals(['a', 'a1', 'a2', '1', '11', '12', '2', '21', '22'], log);

Language/Statements/For/Asynchronous_For_in/execution_A05_t05.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ main() async {
5959
StreamController sc = StreamController();
6060
sc.addStream(Stream.fromIterable([1, 2, 3])).then((_) async {
6161
Expect.listEquals([1, 2, 3], log);
62-
await Future.delayed(Duration(milliseconds: 100));
62+
await null;
6363
sc.add(42); // await for is suspended now
64+
Expect.listEquals([1, 2, 3], log);
6465
await Future.delayed(Duration(milliseconds: 100));
6566
Expect.listEquals([1, 2, 3, 42], log);
6667
visited = true;

0 commit comments

Comments
 (0)