anchor.diff:  }
   
   /**
  + * [_Monitor] can be used to wait for a signal.
  + *
  + * Signals are not queued, the client will receive exactly one signal
  + * regardless of the number of [notify] invocations. The [signal] is reset
  + * after completion and will not complete until [notify] is called next time.
  + */
  +class _Monitor {
  +  Completer<Null> _completer = new Completer<Null>();
  +
  +  /**
  +   * Return a [Future] that completes when [notify] is called at least once.
  +   */
  +  Future<Null> get signal async {
  +    await _completer.future;
  +    _completer = new Completer<Null>();
  +  }
  +
  +  /**
  +   * Complete the [signal] future if it is not completed yet. It is safe to
  +   * call this method multiple times, but the [signal] will complete only once.
  +   */
  +  void notify() {
  +    if (!_completer.isCompleted) {
  +      _completer.complete(true);
  +    }
  +  }
  +}
  +
  +/**
    * TODO(scheglov) document
    */
   class _ReferencedUris {
  
positive.code:   void addFile(String path) {
      _explicitFiles.add(path);
      _filesToAnalyze.add(path);
      _hasWorkStreamController.add('do it!');
    }
  
    /**
  
negative.code:    */
    Stream<AnalysisResult> get results async* {
      try {
        PerformanceLogSection analysisSection = null;
        while (true) {
          // TODO(scheglov) implement state transitioning
          await _hasWork.signal;
  
          if (analysisSection == null) {
            analysisSection = _logger.enter('Analyzing');
          }
  
          // TODO(scheglov) verify one file at a time
          _verifyUnlinkedSignatureOfChangedFiles();
  
          // Analyze the first file in the general queue.
          if (_filesToAnalyze.isNotEmpty) {
            String path = _filesToAnalyze.first;
            _filesToAnalyze.remove(path);
            _File file = _fileForPath(path);
            AnalysisResult result = _computeAnalysisResult(file);
            yield result;
          }
  
          // If there is work to do, notify the monitor.
          if (_filesToAnalyze.isNotEmpty) {
            _hasWork.notify();
          } else {
            analysisSection.exit();
            analysisSection = null;
          }
        }
        // TODO(scheglov) implement
      } finally {
        print('The stream was cancelled.');
      }
  