close method

void close()

Cancels production when necessary and releases the stream handle.

Implementation

void close() {
  if (isClosed) return;
  try {
    cancelSync();
  } finally {
    _owner.close();
  }
}