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

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

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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.dart'; 10 import 'package:analysis_server/src/operation/operation.dart';
11 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
12 12
13
14 /** 13 /**
15 * A queue of operations in an [AnalysisServer]. 14 * A queue of operations in an [AnalysisServer].
16 */ 15 */
17 class ServerOperationQueue { 16 class ServerOperationQueue {
18 final List<Queue<ServerOperation>> _queues = <Queue<ServerOperation>>[]; 17 final List<Queue<ServerOperation>> _queues = <Queue<ServerOperation>>[];
19 18
20 ServerOperationQueue() { 19 ServerOperationQueue() {
21 for (int i = 0; i < ServerOperationPriority.COUNT; i++) { 20 for (int i = 0; i < ServerOperationPriority.COUNT; i++) {
22 var queue = new DoubleLinkedQueue<ServerOperation>(); 21 var queue = new DoubleLinkedQueue<ServerOperation>();
23 _queues.add(queue); 22 _queues.add(queue);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 for (var operation in queue) { 111 for (var operation in queue) {
113 if (test(operation)) { 112 if (test(operation)) {
114 queue.remove(operation); 113 queue.remove(operation);
115 return operation; 114 return operation;
116 } 115 }
117 } 116 }
118 } 117 }
119 return null; 118 return null;
120 } 119 }
121 } 120 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/operation/operation_analysis.dart ('k') | pkg/analysis_server/lib/src/plugin/plugin_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698