anchor.diff:  ///
   /// When you need no further events the `StreamQueue` should be closed
   /// using [cancel]. This releases the underlying stream subscription.
  -class StreamQueue<T> {
  +abstract class StreamQueue<T> {
     // This class maintains two queues: one of events and one of requests.
     // The active request (the one in front of the queue) is called with
  -  // the current event queue when it becomes active.
  +  // the current event queue when it becomes active, every time a
  +  // new event arrives, and when the event source closes.
     //
  -  // If the request returns true, it's complete and will be removed from the
  +  // If the request returns `true`, it's complete and will be removed from the
     // request queue.
  -  // If the request returns false, it needs more events, and will be called
  -  // again when new events are available.
  +  // If the request returns `false`, it needs more events, and will be called
  +  // again when new events are available. It may trigger a call itself by
  +  // calling [_updateRequests].
     // The request can remove events that it uses, or keep them in the event
     // queue until it has all that it needs.
     //
  
positive.code:   /// The future completed when the cancel request is completed.
    Future get future => _completer.future;
  
    bool addEvents(Queue<Result> events) {
      _shutdown();
      return true;
    }
  
    void close(_) {
      _shutdown();
    }
  
    void _shutdown() {
      if (_streamQueue._isDone) {
        _completer.complete();
      } else {
        _streamQueue._ensureListening();
        _completer.complete(_streamQueue._dispose().cancel());
      }
    }
  }
  
  
negative.code:     throw _failClosed();
    }
  
    /// Cancels the underlying event source.
    ///
    /// If [immediate] is `false` (the default), the cancel operation waits until
    /// all previously requested events have been processed, then it cancels the
    /// subscription providing the events.
    ///
    /// If [immediate] is `true`, the source is instead canceled
    /// immediately. Any pending events are completed as though the underlying
    /// stream had closed.
    ///
    /// The returned future completes with the result of calling
    /// `cancel`.
  