Index: pkg/analysis_server/lib/src/operation/operation_queue.dart |
diff --git a/pkg/analysis_server/lib/src/operation/operation_queue.dart b/pkg/analysis_server/lib/src/operation/operation_queue.dart |
index c03318511b738390ac8c31c166aa368d6f5ea03b..b26c677f60e2d6d7479d42c899f2cdfc2fd0f491 100644 |
--- a/pkg/analysis_server/lib/src/operation/operation_queue.dart |
+++ b/pkg/analysis_server/lib/src/operation/operation_queue.dart |
@@ -7,8 +7,8 @@ library operation.queue; |
import 'dart:collection'; |
import 'package:analysis_server/src/analysis_server.dart'; |
-import 'package:analysis_server/src/operation/operation_analysis.dart'; |
import 'package:analysis_server/src/operation/operation.dart'; |
+import 'package:analysis_server/src/operation/operation_analysis.dart'; |
/** |
@@ -30,11 +30,18 @@ class ServerOperationQueue { |
} |
/** |
+ * Returns `true` if there are no queued [ServerOperation]s. |
+ */ |
+ bool get isEmpty { |
+ return _queues.every((queue) => queue.isEmpty); |
+ } |
+ |
+ /** |
* Adds the given operation to this queue. The exact position in the queue |
* depends on the priority of the given operation relative to the priorities |
* of the other operations in the queue. |
*/ |
- void add(ServerOperation operation) { |
+ void add(ServerOperation operation) { |
int queueIndex = operation.priority.ordinal; |
Queue<ServerOperation> queue = _queues[queueIndex]; |
queue.addLast(operation); |
@@ -50,13 +57,6 @@ class ServerOperationQueue { |
} |
/** |
- * Returns `true` if there are no queued [ServerOperation]s. |
- */ |
- bool get isEmpty { |
- return _queues.every((queue) => queue.isEmpty); |
- } |
- |
- /** |
* Returns the next operation to perform or `null` if empty. |
*/ |
ServerOperation take() { |
@@ -80,4 +80,3 @@ class ServerOperationQueue { |
return null; |
} |
} |
- |