Interrupt kernel of current client.
513212
def interrupt_kernel(self):
        """"""
        client = self.get_current_client()
        if client is not None:
            self.switch_to_plugin()
            client.stop_button_click_handler()
445758
protected void throttleOutgoingMessage ()
    {
        Throttle throttle = _client.getOutgoingMessageThrottle();
        synchronized(throttle) {
            while (throttle.throttleOp()) {
                try {
                    Thread.sleep(2);
                } catch (InterruptedException ie) {
                    // no problem
                }
            }
        }
    }
1081998
def _clear_interrupt(self, intbit):
        
        int_status = self._device.readU8(VCNL4010_INTSTAT);
        int_status &= ~intbit;
        self._device.write8(VCNL4010_INTSTAT, int_status);
1055019
def stop(self):
        
        logger.debug('Stopping kernel')
        self.kc.stop_channels()
        self.km.shutdown_kernel(now=True)
        del self.km
831945
protected void stopRPC(boolean interruptClientHandlers) throws IOException {
    try {
      // stop avatardatanode server
      stopRPCInternal(server, "avatardatanode", interruptClientHandlers);
      
      // stop namenode rpc (client, datanode)
      super.stopRPC(interruptClientHandlers);
     
      // wait for avatardatanode rpc
      stopWaitRPCInternal(server, "avatardatanode");
    } catch (InterruptedException ex) {
      throw new IOException("stopRPC() interrupted", ex);
    }
  }
569435
def interrupt (aggregate):
    """"""
    while True:
        try:
            log.warn(LOG_CHECK,
               _("interrupt; waiting for active threads to finish"))
            log.warn(LOG_CHECK,
               _("another interrupt will exit immediately"))
            abort(aggregate)
            break
        except KeyboardInterrupt:
            pass
1007274
def interrupt(self, data=None):
        
        self.interrupted = True
        if data is not None:
            return self.write(data)
        else:
            return True
1371218
def dispatch_sockets(self, timeout=None):
        """"""
        for sock in self.select_sockets(timeout=timeout):
            if sock is self.listener:
                listener = sock
                sock, addr = listener.accept()
                self.connected(sock)
            else:
                try:
                    sock.recv(1)
                except socket.error as exc:
                    if exc.errno != ECONNRESET:
                        raise
                self.disconnected(sock)
198998
def close_socket(self):
        """"""
        if _debug: UDPDirector._debug("close_socket")

        self.socket.close()
        self.close()
        self.socket = None
1115674
protected void stopRPC(boolean interruptClientHandlers)
      throws IOException, InterruptedException {
    // stop client handlers
    stopRPCInternal(server, "client", interruptClientHandlers);

    // stop datanode handlers
    stopRPCInternal(dnProtocolServer, "datanode", interruptClientHandlers);

    // waiting for the ongoing requests to complete
    stopWaitRPCInternal(server, "client");
    stopWaitRPCInternal(dnProtocolServer, "datanode");
  }
448700
def resume(self) -> None:
        """"""
        with self.__state_lock:
            if self.__state == DataChannelBuffer.State.paused:
                self.__state = DataChannelBuffer.State.started
113502
def set_interrupt(self, enabled):
        """"""
        enable_reg = self._readU8(TCS34725_ENABLE)
        if enabled:
            enable_reg |= TCS34725_ENABLE_AIEN
        else:
            enable_reg &= ~TCS34725_ENABLE_AIEN
        self._write8(TCS34725_ENABLE, enable_reg)
        time.sleep(1)
692769
def interrupt_kernel_hack(signal_to_send=None):
    
    global pid
    import signal
    import os
    if pid is None:
        # Avoid errors if we couldn't get pid originally,
        # by trying to obtain it now
        pid = set_pid()

        if pid is None:
            echo("cannot get kernel PID, Ctrl-C will not be supported")
            return
    if not signal_to_send:
        signal_to_send = signal.SIGINT

    echo("KeyboardInterrupt (sent to ipython: pid " +
        "%i with signal %s)" % (pid, signal_to_send),"Operator")
    try:
        os.kill(pid, int(signal_to_send))
    except OSError:
        echo("unable to kill pid %d" % pid)
        pid = None
736214
def _handle_client(self):
        
        while True:
            try:
                # Wait for connection.
                logger.info('Waiting for connection in pipe instance.')
                yield From(self._connect_client())
                logger.info('Connected in pipe instance')

                conn = Win32PipeConnection(self)
                self.pipe_connection_cb(conn)

                yield From(conn.done_f)
                logger.info('Pipe instance done.')

            finally:
                # Disconnect and reconnect.
                logger.info('Disconnecting pipe instance.')
                windll.kernel32.DisconnectNamedPipe(self.pipe_handle)
121303
def stop(self):
        """"""
        if self._thread:
            _LOGGER.info("Stopping SocketIO thread...")

            # pylint: disable=W0212
            self._running = False

            if self._exit_event:
                self._exit_event.set()

            self._thread.join()
572682
def stop(self):
        """"""

        if self._disconnector:
            self._disconnector.stop()

        self.client.disconnect()
400653
def stop(self):
        """"""
        if self.__task:
            self.__task.cancel()
        if self.__poller:
            self.__poller.unregister(self.zap_socket)
            self.__poller = None
        super().stop()