Abort the stream.

        The stream is flushed and the internal data structures are cleaned up.
        No stream footer is sent. The stream is :attr:`closed` afterwards.

        If the stream is already :attr:`closed`, this method does nothing.
339245
def abort(self):
        
        if self._closed:
            return
        self._closed = True
        self._writer.flush()
        del self._writer
1215624
def close(self):
    """"""
    self.acquire()
    try:
      self.flush()
      try:
        # Do not close the stream if it's sys.stderr|stdout. They may be
        # redirected or overridden to files, which should be managed by users
        # explicitly.
        if self.stream not in (sys.stderr, sys.stdout) and (
            not hasattr(self.stream, 'isatty') or not self.stream.isatty()):
          self.stream.close()
      except ValueError:
        # A ValueError is thrown if we try to run isatty() on a closed file.
        pass
      super(PythonHandler, self).close()
    finally:
      self.release()
1354118
def abort(self):
        
        self._coll.chunks.delete_many(
            {"files_id": self._file['_id']}, session=self._session)
        self._coll.files.delete_one(
            {"_id": self._file['_id']}, session=self._session)
        object.__setattr__(self, "_closed", True)
1255052
def close(self):
        
        if self._closed:
            return
        self._closed = True
        self._writer.endElementNS((namespaces.xmlstream, "stream"), None)
        for prefix in self._nsmap_to_use:
            self._writer.endPrefixMapping(prefix)
        self._writer.endDocument()
        del self._writer
420026
def close(self):
        
        self.out_stream.close()
        # If we're asked to write in place, substitute the named
        # temporary file for the current file
        if self.in_place:
            shutil.move(self.temp_file.name, self.out)
1065442
public void close() {
        open = false;
        try {
            os.flush();
            if (closeStream)
                os.close();
        }
        catch(IOException ioe) {
            throw new ExceptionConverter(ioe);
        }
    }
641921
def close(self):
        
        if self._writable and not self._is_raw_of_buffered and not self._closed:
            self._closed = True
            if self._write_buffer:
                self.flush()
768397
def close_stream(self):
        
        if self.fout:
            fout = self.fout
            fout_fn = self.fout_fn
            self.fout.flush()
            self.fout.close()
            self.fout = None
            self.fout_fn = None
            return fout_fn
395526
def is_closing(self) -> bool:
        
        return self.stream.closed() or self.client_terminated or self.server_terminated
528627
def close(self):
        
        if not self._closed:
            self.__flush()
            object.__setattr__(self, "_closed", True)
998917
public void close() {
        //log.debug("Stream close: {}", publishedName);
        if (closed.compareAndSet(false, true)) {
            if (livePipe != null) {
                livePipe.unsubscribe((IProvider) this);
            }
            // if we have a recording listener, inform that this stream is done
            if (recordingListener != null) {
                sendRecordStopNotify();
                notifyRecordingStop();
                // inform the listener to finish and close
                recordingListener.get().stop();
            }
            sendPublishStopNotify();
            // TODO: can we send the client something to make sure he stops sending data?
            if (connMsgOut != null) {
                connMsgOut.unsubscribe(this);
            }
            notifyBroadcastClose();
            // clear the listener after all the notifications have been sent
            if (recordingListener != null) {
                recordingListener.clear();
            }
            // clear listeners
            if (!listeners.isEmpty()) {
                listeners.clear();
            }
            // deregister with jmx
            unregisterJMX();
            setState(StreamState.CLOSED);
        }
    }
578503
def stop(self):
        
        err = _pa.Pa_StopStream(self._stream)
        if err == _pa.paStreamIsStopped:
            return
        self._handle_error(err)
1251653
def close(self, **kwargs):
        
        self.keep_running = False
        if self.sock:
            self.sock.close(**kwargs)
            self.sock = None
133167
def close(self):
        '''
        
        '''
        if self._closing:
            return
        self._closing = True
        if hasattr(self.sock, 'close'):
            self.sock.close()
211119
def close_stream(self):
		
		self.keep_listening = False
		self.stream.stop()
		self.stream.close()
488134
public void abort() {
    this.explicitClosed = true;

    boolean lockStatus = false;
    if (lock != null) {
      lockStatus = lock.tryLock();
    }
    this.connected = false;

    abortActiveStream();

    if (!lockStatus) {
      //lock not available : query is running
      // force end by executing an KILL connection
      forceAbort();
      try {
        socket.setSoLinger(true, 0);
      } catch (IOException ioException) {
        //eat
      }
    } else {
      SendClosePacket.send(writer);
    }

    closeSocket(reader, writer, socket);
    cleanMemory();
    if (lockStatus) {
      lock.unlock();
    }
  }
518738
public void abort() {
    try {
      super.close();
    } catch (IOException ioe) {
      LOG.warn("Unable to abort file " + tmpFile, ioe);
    }
    if (!tmpFile.delete()) {
      LOG.warn("Unable to delete tmp file during abort " + tmpFile);
    }
  }