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

Side by Side Diff: pkg/scheduled_test/lib/src/task.dart

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library task; 5 library task;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:stack_trace/stack_trace.dart'; 10 import 'package:stack_trace/stack_trace.dart';
11 11
12 import '../scheduled_test.dart' show currentSchedule;
13 import 'future_group.dart'; 12 import 'future_group.dart';
14 import 'schedule.dart'; 13 import 'schedule.dart';
15 import 'utils.dart'; 14 import 'utils.dart';
16 15
17 typedef Future TaskBody(); 16 typedef Future TaskBody();
18 17
19 /// A single task to be run as part of a [TaskQueue]. 18 /// A single task to be run as part of a [TaskQueue].
20 /// 19 ///
21 /// There are two levels of tasks. **Top-level tasks** are created by calling 20 /// There are two levels of tasks. **Top-level tasks** are created by calling
22 /// [TaskQueue.schedule] before the queue in question is running. They're run in 21 /// [TaskQueue.schedule] before the queue in question is running. They're run in
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 final String name; 153 final String name;
155 154
156 /// Whether the state indicates that the task has finished running. This is 155 /// Whether the state indicates that the task has finished running. This is
157 /// true for both the [SUCCESS] and [ERROR] states. 156 /// true for both the [SUCCESS] and [ERROR] states.
158 bool get isDone => this == SUCCESS || this == ERROR; 157 bool get isDone => this == SUCCESS || this == ERROR;
159 158
160 const TaskState._(this.name); 159 const TaskState._(this.name);
161 160
162 String toString() => name; 161 String toString() => name;
163 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698