Close the poll instance.
356484
def close(self):
        """"""
        if self._poll is None:
            return
        self._poll.close()
        self._poll = None
        self._readers = 0
        self._writers = 0
        self._events = 0
        clear_callbacks(self)
214412
public final void close() {
        synchronized (this.lock) {
            final SessionState oldState = this.state;

            switch (this.state) {
                case CREATED:
                case OPENING:
                    this.state = SessionState.CLOSED_LOGIN_FAILED;
                    postStateChange(oldState, this.state, new FacebookException(
                            "Log in attempt aborted."));
                    break;

                case CREATED_TOKEN_LOADED:
                case OPENED:
                case OPENED_TOKEN_UPDATED:
                    this.state = SessionState.CLOSED;
                    postStateChange(oldState, this.state, null);
                    break;

                case CLOSED:
                case CLOSED_LOGIN_FAILED:
                    break;
            }
        }
    }
140955
def terminate(self):
        """"""
        if self._closed:
            return
        self._check_init()
        for ch in self._holders:
            ch.terminate()
        self._closed = True
1231484
public void close() {
        boolean isPreviouslyClosed = isClosed.getAndSet(true);
        if (isPreviouslyClosed) {
            return;
        }

        AdminClient client;
        while ((client = clientCache.poll()) != null) {
            client.close();
        }
    }
659715
async def stop(self) -> None:
        """"""
        if not self._is_running:
            raise SublemonRuntimeError(
                'Attempted to stop an already-stopped `Sublemon` instance')

        await self.block()
        self._poll_task.cancel()
        self._is_running = False
        with suppress(asyncio.CancelledError):
            await self._poll_task
1022926
def close(self):
        
        if hasattr(self, "thread"):
            self.thread._exit = True
            self.thread.join(1000)
        if self._conn is not None:
            self._conn.close()
1185592
def close(self):
        
        # Disconnect with a fancy message, then close connection
        if self._connection is not None:
            self._connection.disconnect("Bot is quitting")
            self._connection.close()
            self._connection = None

        # Stop the client loop
        self.__stopped.set()

        if self.__thread is not None:
            try:
                self.__thread.join(5)
            except RuntimeError:
                pass
            self.__thread = None
1019322
def stop(self):
        
        self._stop_event.set()
        os.write(self._pipe[1], b'stop')
        threading.Thread.join(self)
        Notifier.stop(self)
        self._pollobj.unregister(self._pipe[0])
        os.close(self._pipe[0])
        os.close(self._pipe[1])
1314385
def close(self):
        """"""
        if self._transport:
            self._transport.close()
        self._transport = None
        self._chacha = None
812645
def close(self):
        """"""
        self._closed = True
        if self.receive_task:
            self.receive_task.cancel()
        if self.connection:
            self.connection.close()
1338691
def close(self):
        
        self._execute_plugin_hooks_sync(hook='close')

        if not self.session.closed:
            ensure_future(self.session.close(), loop=self.loop)
995469
def close(self):
        
        self.stop()
        for sub in list(self.subscribers) + self._hooks:
            try:
                sub.setsockopt(LINGER, 1)
                sub.close()
            except ZMQError:
                pass
916726
def close(self):
    """"""
    if hasattr(self, "_controller") and self._controller:
      self._controller.quit()
      self._controller.close()
      self._controller = None
    self._shutdown()
    if hasattr(self, "_port") and self._port:
      portpicker.return_port(self._port)
      self._port = None
    if hasattr(self, "_tmp_dir") and os.path.exists(self._tmp_dir):
      shutil.rmtree(self._tmp_dir)
340570
def close(self):
        ''''''
        if self._call_later_handle:
            self._call_later_handle.cancel()

        self._running = False
239267
def close(self):
        
        resource = ResourceLocator(CommandShell.ShellResource)
        resource.add_selector('ShellId', self.__shell_id)
        self.session.delete(resource)
1272642
def close(self):
        
        if hasattr(self.response, "close"):
            self.response.close()
        for func in self._on_close:
            func()
914311
def close(self):
        """"""
        if not self.lock_disable and self.session_config_lock:
            self._unlock()
        self.device.close()