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

Side by Side Diff: pkg/analyzer/lib/src/task/manager.dart

Issue 1124003007: In the new task model, use explicit dependencies on the type provider. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reformat Created 5 years, 7 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.src.task.manager; 5 library analyzer.src.task.manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/java_engine.dart'; 9 import 'package:analyzer/src/generated/java_engine.dart';
10 import 'package:analyzer/task/model.dart'; 10 import 'package:analyzer/task/model.dart';
(...skipping 15 matching lines...) Expand all
26 * analysis root. 26 * analysis root.
27 */ 27 */
28 Set<ResultDescriptor> generalResults = new Set<ResultDescriptor>(); 28 Set<ResultDescriptor> generalResults = new Set<ResultDescriptor>();
29 29
30 /** 30 /**
31 * A list of the results that are to be computed for priority sources. 31 * A list of the results that are to be computed for priority sources.
32 */ 32 */
33 Set<ResultDescriptor> priorityResults = new Set<ResultDescriptor>(); 33 Set<ResultDescriptor> priorityResults = new Set<ResultDescriptor>();
34 34
35 /** 35 /**
36 * Indicates whether any tasks are currently being performed (or building
37 * their inputs). In debug builds, we use this to ensure that tasks don't
38 * try to make use of the task manager in reentrant fashion.
39 */
40 bool isTaskRunning = false;
scheglov 2015/05/13 21:49:09 I'm not sure that this is the best place for this
Paul Berry 2015/05/14 17:11:01 Where do you think would be better? I'm open to s
scheglov 2015/05/14 17:13:04 Maybe WorkOrder or AnalysisDriver.
Paul Berry 2015/05/14 17:27:33 WorkOrder doesn't work because we create fresh wor
41
42 /**
36 * Add the given [result] to the list of results that are to be computed for 43 * Add the given [result] to the list of results that are to be computed for
37 * all sources within an analysis root. 44 * all sources within an analysis root.
38 */ 45 */
39 void addGeneralResult(ResultDescriptor result) { 46 void addGeneralResult(ResultDescriptor result) {
40 generalResults.add(result); 47 generalResults.add(result);
41 } 48 }
42 49
43 /** 50 /**
44 * Add the given [result] to the list of results that are to be computed for 51 * Add the given [result] to the list of results that are to be computed for
45 * priority sources. 52 * priority sources.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 /** 112 /**
106 * Given a list of task [descriptors] that can be used to compute some 113 * Given a list of task [descriptors] that can be used to compute some
107 * unspecified result, return the descriptor that will compute the result with 114 * unspecified result, return the descriptor that will compute the result with
108 * the least amount of work. 115 * the least amount of work.
109 */ 116 */
110 TaskDescriptor _findBestTask(List<TaskDescriptor> descriptors) { 117 TaskDescriptor _findBestTask(List<TaskDescriptor> descriptors) {
111 // TODO(brianwilkerson) Improve this implementation. 118 // TODO(brianwilkerson) Improve this implementation.
112 return descriptors[0]; 119 return descriptors[0];
113 } 120 }
114 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698