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

Side by Side Diff: pkg/analysis_server/lib/src/operation/operation_queue.dart

Issue 311653002: Extract analysis/notifications into a separate operation/file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for the test method name. Created 6 years, 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 operation.queue; 5 library operation.queue;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/operation/operation_analysis.dart';
10 import 'package:analysis_server/src/operation/operation.dart'; 11 import 'package:analysis_server/src/operation/operation.dart';
11 12
12 13
13 /** 14 /**
14 * A queue of operations in an [AnalysisServer]. 15 * A queue of operations in an [AnalysisServer].
15 */ 16 */
16 class ServerOperationQueue { 17 class ServerOperationQueue {
17 final List<ServerOperationPriority> _analysisPriorities = [ 18 final List<ServerOperationPriority> _analysisPriorities = [
18 ServerOperationPriority.ANALYSIS_CONTINUE, 19 ServerOperationPriority.ANALYSIS_CONTINUE,
19 ServerOperationPriority.ANALYSIS]; 20 ServerOperationPriority.ANALYSIS];
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 for (Queue<ServerOperation> queue in _queues) { 74 for (Queue<ServerOperation> queue in _queues) {
74 if (!queue.isEmpty) { 75 if (!queue.isEmpty) {
75 return queue.removeFirst(); 76 return queue.removeFirst();
76 } 77 }
77 } 78 }
78 // empty 79 // empty
79 return null; 80 return null;
80 } 81 }
81 } 82 }
82 83
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698