close method

Future<void> close()

Implementation

Future<void> close() async {
  if (_closed || _closing) return;
  _closing = true;
  try {
    await _drainPending();
    await _guard('close', () => _backend.close());
  } finally {
    _closed = true;
  }
}