close method

Future<void> close()

Close the shard. Idempotent — safe to call more than once.

Implementation

Future<void> close() async {
  if (_closed) return;
  _closed = true;
  final h = _shard;
  _shard = nullptr;
  if (h != nullptr) {
    _b.qe_shard_close(h);
  }
  _finalizer.detach(this);
}