Examples of interrupt()


Examples of org.apache.hadoop.test.MultithreadedTestUtil.TestingThread.interrupt()

      // then it throws ClosedByInterruptException due to
      // some Java quirk. Waiting for it to call read()
      // gets it into select(), so we get the expected
      // InterruptedIOException.
      Thread.sleep(1000);
      thread.interrupt();
      ctx.stop();

      //make sure the channels are still open
      assertTrue(source.isOpen());
      assertTrue(sink.isOpen());

Examples of org.apache.hadoop.util.Daemon.interrupt()

    @Override
    protected void _processEvent(InjectionEventI event, Object... args) {
      if (event == InjectionEvent.FSNAMESYSTEM_STOP_MONITOR) {
        Daemon monitor = (Daemon) args[0];
        if (monitor != null && monitor.isAlive()) {
          monitor.interrupt();
        }
      }
    }
  }

Examples of org.apache.ivy.core.IvyThread.interrupt()

                    prevLength = length;
                } else {
                    if (System.currentTimeMillis() - lastUpdate > timeout) {
                        Message.verbose("download hang for more than " + timeout
                                + "ms. Interrupting.");
                        get.interrupt();
                        if (to.exists()) {
                            to.delete();
                        }
                        throw new IOException(source + " download timeout from " + getHost());
                    }

Examples of org.apache.ivy.core.IvyThread.interrupt()

                    prevLength = length;
                } else {
                    if (System.currentTimeMillis() - lastUpdate > timeout) {
                        Message.verbose("download hang for more than " + timeout
                                + "ms. Interrupting.");
                        get.interrupt();
                        if (to.exists()) {
                            to.delete();
                        }
                        throw new IOException(source + " download timeout from " + getHost());
                    }

Examples of org.apache.ivy.core.IvyThread.interrupt()

                    prevLength = length;
                } else {
                    if (System.currentTimeMillis() - lastUpdate > timeout) {
                        Message.verbose("download hang for more than " + timeout
                                + "ms. Interrupting.");
                        get.interrupt();
                        if (to.exists())
                            to.delete();
                        throw new IOException(source + " download timeout from " + getHost());
                    }
                }

Examples of org.apache.ivy.core.IvyThread.interrupt()

          lastUpdate = System.currentTimeMillis();
          prevLength = length;
        } else {
          if (System.currentTimeMillis() - lastUpdate > timeout) {
            Message.verbose("download hang for more than "+timeout+"ms. Interrupting.");
            get.interrupt();
            if (to.exists()) to.delete();
            throw new IOException(source+" download timeout from "+getHost());
          }
        }
        try {

Examples of org.apache.jmeter.threads.JMeterThread.interrupt()

        // ConcurrentHashMap does not need synch. here
        for(Entry<JMeterThread, Thread> entry : engine.allThreads.entrySet()){
            JMeterThread thrd = entry.getKey();
            if (thrd.getThreadName().equals(threadName)){
                thrd.stop();
                thrd.interrupt();
                if (now) {
                    Thread t = entry.getValue();
                    if (t != null) {
                        t.interrupt();
                    }

Examples of org.apache.jmeter.threads.JMeterThread.interrupt()

    private void tellThreadsToStop() {
        // ConcurrentHashMap does not need protecting
        for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) {
            JMeterThread item = entry.getKey();
            item.stop(); // set stop flag
            item.interrupt(); // interrupt sampler if possible
            Thread t = entry.getValue();
            if (t != null ) { // Bug 49734
                t.interrupt(); // also interrupt JVM thread
            }
        }

Examples of org.apache.jmeter.threads.JMeterThread.interrupt()

        // ConcurrentHashMap does not need synch. here
        for(Entry<JMeterThread, Thread> entry : engine.allThreads.entrySet()){
            JMeterThread thrd = entry.getKey();
            if (thrd.getThreadName().equals(threadName)){
                thrd.stop();
                thrd.interrupt();
                if (now) {
                    Thread t = entry.getValue();
                    if (t != null) {
                        t.interrupt();
                    }

Examples of org.apache.jmeter.threads.JMeterThread.interrupt()

    private void tellThreadsToStop() {
        // ConcurrentHashMap does not need protecting
        for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) {
            JMeterThread item = entry.getKey();
            item.stop(); // set stop flag
            item.interrupt(); // interrupt sampler if possible
            Thread t = entry.getValue();
            if (t != null ) { // Bug 49734
                t.interrupt(); // also interrupt JVM thread
            }
        }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.