| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |