abort method

Future<void> abort()

Aborts this edit. This releases the edit lock so another edit may be started on the same key.

Implementation

Future<void> abort() => _cache._lock.synchronized(() async {
      if (_done) throw StateError('editor was done');
      if (_entry.currentEditor == this) {
        try {
          await _cache._completeEdit(this, false);
        } finally {
          _done = true;
        }
      } else {
        _done = true;
      }
    });