Close this pipe object.  Future calls to `read` after the buffer
        has been emptied will return immediately with an empty string.
501062
def close(self):
        
        self._lock.acquire()
        try:
            self._closed = True
            self._cv.notifyAll()
            if self._event is not None:
                self._event.set()
        finally:
            self._lock.release()
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()
1091357
public void close() throws IOException {   
    if (closed) {
      checkWriteThread();
      return;
    }
    try {
      buffer.close(); 
      // writeThread should exit after this
      // and close underlying stream
      try {
        writeThread.join();
      } catch (InterruptedException e) {
        throw new IOException(e);
      }
    } finally {
      checkWriteThread();
    }
  }
1034049
def close(self):
        """"""
        if hasattr(self, 'proc'):
            # First check the process's execution status before attempting to
            # kill it. This fixes an issue on Windows Subsystem for Linux where
            # ffmpeg closes normally on its own, but never updates
            # `returncode`.
            self.proc.poll()

            # Kill the process if it is still running.
            if self.proc.returncode is None:
                self.proc.kill()
                self.proc.wait()

            # Wait for the stream-reading threads to exit. (They need to
            # stop reading before we can close the streams.)
            if hasattr(self, 'stderr_reader'):
                self.stderr_reader.join()
            if hasattr(self, 'stdout_reader'):
                self.stdout_reader.join()

            # Close the stdout and stderr streams that were opened by Popen,
            # which should occur regardless of if the process terminated
            # cleanly.
            self.proc.stdout.close()
            self.proc.stderr.close()

        # Close the handle to os.devnull, which is opened regardless of if
        # a subprocess is successfully created.
        self.devnull.close()
260271
def close(self):
        '''
        
        '''
        if not self._closing:
            IPCClient.close(self)
            if self._closing:
                # This will prevent this message from showing up:
                # '[ERROR   ] Future exception was never retrieved:
                # StreamClosedError'
                if self._read_sync_future is not None and self._read_sync_future.done():
                    self._read_sync_future.exception()
                if self._read_stream_future is not None and self._read_stream_future.done():
                    self._read_stream_future.exception()
822013
@Override
    public void close() throws IOException {
        // Notify encoder of EOF (-1).
        if (doEncode) {
            baseNCodec.encode(singleByte, 0, EOF, context);
        } else {
            baseNCodec.decode(singleByte, 0, EOF, context);
        }
        flush();
        out.close();
    }
1028556
def close(self):
        
        self.closed = True
        self._flush_bits_to_stream()
        self._stream.close()
1239524
@Override
  public void close() throws IOException {
    checkState(isInitialized, "initialize() must be invoked before use.");
    if (isOpen()) {
      try {
        pipeSinkChannel.close();
        handleResponse(waitForCompletionAndThrowIfUploadFailed());
      } finally {
        pipeSinkChannel = null;
        uploadOperation = null;
      }
    }
  }
1169131
async def close(self) -> None:
        
        self.stream.close()
        # Block until the serving loop is done, but ignore any exceptions
        # (start_serving is already responsible for logging them).
        assert self._serving_future is not None
        try:
            await self._serving_future
        except Exception:
            pass
761354
private void closeDataReader() throws IOException {
    if (mCurrentChunk != null) {
      mCurrentChunk.release();
      mCurrentChunk = null;
    }
    if (mDataReader != null) {
      mDataReader.close();
    }
    mDataReader = null;
  }
82108
private void closeInputFile() throws IOException
	{
		myLineReader.close();
		myBufferedReader.close();
		myStreamReader.close();
		myInputStream.close();
	}
183055
def __flush_buffer(self):
        
        self.__flush_data(self._buffer.getvalue())
        self._buffer.close()
        self._buffer = StringIO()
351893
def _flush(self, buffer):
        
        if not self.state.should_try():
            logger.error("dropping flushed data due to transport failure back-off")
        else:
            fileobj = buffer.fileobj  # get a reference to the fileobj before closing the gzip file
            buffer.close()

            # StringIO on Python 2 does not have getbuffer, so we need to fall back to getvalue
            data = fileobj.getbuffer() if hasattr(fileobj, "getbuffer") else fileobj.getvalue()
            try:
                self.send(data)
                self.handle_transport_success()
            except Exception as e:
                self.handle_transport_fail(e)
179227
private function close()
    {
        if (null !== $this->pipe && $this->pipe->isOpen()) {
            $this->pipe->close();
        }

        if (is_resource($this->socket)) {
            fclose($this->socket);
        }

        $this->thread = null;
        $this->channel = null;
    }
437601
public void close() throws IOException {
		if (parser != null) {
			parser.close();
		}
		if (reader != null) {
			reader.close();
		}
	}
904629
public void destroy()
    {
        ByteArrayPool.returnByteArray(_buf);
        _byteBuffer=null;
        _reader=null;
        _lineBuffer=null;
        _encoding=null;
    }
1106400
def next(self):
        
        self.open_read()
        data = self.resp.read(self.BufferSize)
        if not data:
            self.close()
            raise StopIteration
        return data