Close bulk processor.
169031
public void closeBulkProcessor() {
        Optional.ofNullable(bulkProcessor).filter(peek(BulkProcessor::flush))
                .ifPresent(BulkProcessor::close);
    }
160733
public void close() {
        if (running) {
            taskPool.clear();
            running = false;
            for (PoolThread thread : threadPool) {
                thread.interrupt();
            }
        }
    }
1286642
def close(self) -> None:
        """"""
        self.available_tables.clear()

        self.zipinfo.clear()

        self.block_age = 0
        self.block_cache.clear()

        while self.streams:
            _, stream = self.streams.popitem()
            stream.close()
1030506
def close(self):
        """"""
        if self.mapping is None:
            return

        self.mapping.close()
        self.mapping = None

        self._fd = None
1277543
async def close(self, timeout=5) -> None:
        """"""
        if not self.is_running:
            _LOGGER.warning("FFmpeg isn't running!")
            return

        # Can't use communicate because we attach the output to a streamreader
        def _close():
            """Close ffmpeg."""
            self._proc.stdin.write(b"q")
            self._proc.wait(timeout=timeout)

        # send stop to ffmpeg
        try:
            await self._loop.run_in_executor(None, _close)
            _LOGGER.debug("Close FFmpeg process")

        except (subprocess.TimeoutExpired, ValueError):
            _LOGGER.warning("Timeout while waiting of FFmpeg")
            self.kill()

        finally:
            self._clear()
151939
def close(self):
        '''
        '''
        if not self._process:
            return

        if self._process.returncode is not None:
            return

        _logger.debug('Terminate process.')

        try:
            self._process.terminate()
        except OSError as error:
            if error.errno != errno.ESRCH:
                raise

        for dummy in range(10):
            if self._process.returncode is not None:
                return

            time.sleep(0.05)

        _logger.debug('Failed to terminate. Killing.')

        try:
            self._process.kill()
        except OSError as error:
            if error.errno != errno.ESRCH:
                raise
506193
def _Close(self):
    """"""
    self._tar_ext_file.close()
    self._tar_ext_file = None

    self._file_system.Close()
    self._file_system = None
1010642
def close(self):
        """"""
        if self._filename and self._fh:
            self._fh.close()
            self._fh = None
1001160
private function closeProcess()
    {
        fclose($this->pipes[0]);
        fclose($this->pipes[1]);
        fclose($this->pipes[2]);
        proc_close($this->process);
    }
133630
def close(self):
    """"""
    self._report_file.close()
    # Make sure everything's closed.
    for files in self._output_files.values():
      for f in files.values():
        f.close()
59041
def close(self):
        """"""
        # Give time to flush data if debug was on
        if self.debug:
            time.sleep(10)

        # Terminate workers
        for host in self.workers:
            host.close()

        # Terminate the brokers
        for broker in self.brokers:
            try:
                broker.close()
            except AttributeError:
                # Broker was not started (probably mislaunched)
                pass

        scoop.logger.info('Finished cleaning spawned subprocesses.')
109804
def close(self):
        """"""
        self.fire(JSONStreamer.DOC_END_EVENT)
        self._stack = None
        self._parser.close()
12068
def close(self):
        
        os.remove(self._file)
        os.rmdir(self._dir)
        self.thread._exit = True
        self.thread.join(1000)
        self._close()
1054308
def close(self):
        
        self._closing = True
        for i in xrange(self.size):
            self.inq.put(_STOP)
995497
def close(self):
        """"""
        if not self.is_open:
            return
        super(IndexCreator, self).close()
        self.fidx.close()
773386
def close(self):
        
        if "_tx" in self.__dict__ and "_proc" in self.__dict__:
            self._tx.put(("close", (), {}))
            self._proc.join()
237293
def close(self, idempotency_key=None):
        """"""
        url = self.instance_url() + '/close'
        headers = populate_headers(idempotency_key)
        d = self.request('post', url, {}, headers)
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)