| 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 7ea825759599e6e047531dc6ef25c9c6a66f3a3c..ced4a8c9e54f74c59d2c92e382f5b5fc6558d6b0 100644
 | 
| --- a/pkg/analysis_server/lib/src/operation/operation_queue.dart
 | 
| +++ b/pkg/analysis_server/lib/src/operation/operation_queue.dart
 | 
| @@ -8,6 +8,7 @@ import 'dart:collection';
 | 
|  
 | 
|  import 'package:analysis_server/src/analysis_server.dart';
 | 
|  import 'package:analysis_server/src/operation/operation.dart';
 | 
| +import 'package:analyzer/src/generated/engine.dart';
 | 
|  import 'package:analyzer/src/generated/source.dart';
 | 
|  
 | 
|  /**
 | 
| @@ -51,6 +52,16 @@ class ServerOperationQueue {
 | 
|    }
 | 
|  
 | 
|    /**
 | 
| +   * The given [context] has been removed, so all pending operations that refer
 | 
| +   * to it should be removed from the queue.
 | 
| +   */
 | 
| +  void contextRemoved(AnalysisContext context) {
 | 
| +    for (Queue<ServerOperation> queue in _queues) {
 | 
| +      queue.removeWhere((operation) => operation.context == context);
 | 
| +    }
 | 
| +  }
 | 
| +
 | 
| +  /**
 | 
|     * Return the next operation to perform, or `null` if the queue is empty.
 | 
|     * This method does not change the queue.
 | 
|     */
 | 
| 
 |