Package org.apache.jmeter.threads

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


     */
    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
            }
View Full Code Here


    } catch (Exception e) {
      log.warn("stopThread: " + e);
      return false;
    }
    if (thrd != null) {
      thrd.stop();
      if (now) {
        Thread t = (Thread) allThreadsSave.get(thrd);
        if (t != null) {
          t.interrupt();
        }
View Full Code Here

  private void tellThreadsToStop() {
    Iterator iter = new HashSet(allThreads.keySet()).iterator();
    while (iter.hasNext()) {
      JMeterThread item = (JMeterThread) iter.next();
      item.stop();
      Thread t = (Thread) allThreads.get(item);
      if (t != null) {
        t.interrupt();
      } else {
        log.warn("Lost thread: " + item.getThreadName());
View Full Code Here

  private void stopAllThreads() {
    Iterator iter = new HashSet(allThreads.keySet()).iterator();
    while (iter.hasNext()) {
      JMeterThread item = (JMeterThread) iter.next();
      item.stop();
    }
  }

  // Remote exit
  public void exit() {
View Full Code Here

                    break; // Found matching thread
                }
            }
        }
        if (thrd != null) {
            thrd.stop();
            thrd.interrupt();
            if (now) {
                Thread t = engine.allThreads.get(thrd);
                if (t != null) {
                    t.interrupt();
View Full Code Here

    private void tellThreadsToStop() {
        synchronized (allThreads) { // Protect iterator
            Iterator<JMeterThread> iter = new HashSet<JMeterThread>(allThreads.keySet()).iterator();
            while (iter.hasNext()) {
                JMeterThread item = iter.next();
                item.stop(); // set stop flag
                item.interrupt(); // interrupt sampler if possible
                Thread t = allThreads.get(item);
                t.interrupt(); // also interrupt JVM thread
            }
        }
View Full Code Here

    private void stopAllThreads() {
        synchronized (allThreads) {// Protect iterator
            Iterator<JMeterThread> iter = new HashSet<JMeterThread>(allThreads.keySet()).iterator();
            while (iter.hasNext()) {
                JMeterThread item = iter.next();
                item.stop(); // This is quick
            }
        }
    }

    // Remote exit
View Full Code Here

                    break; // Found matching thread
                }
            }
        }
        if (thrd != null) {
            thrd.stop();
            thrd.interrupt();
            if (now) {
                Thread t = (Thread) engine.allThreads.get(thrd);
                if (t != null) {
                    t.interrupt();
View Full Code Here

    private void tellThreadsToStop() {
        synchronized (allThreads) { // Protect iterator
            Iterator iter = new HashSet(allThreads.keySet()).iterator();
            while (iter.hasNext()) {
                JMeterThread item = (JMeterThread) iter.next();
                item.stop(); // set stop flag
                item.interrupt(); // interrupt sampler if possible
                Thread t = (Thread) allThreads.get(item);
                t.interrupt(); // also interrupt JVM thread
            }
        }
View Full Code Here

    private void stopAllThreads() {
        synchronized (allThreads) {// Protect iterator
            Iterator iter = new HashSet(allThreads.keySet()).iterator();
            while (iter.hasNext()) {
                JMeterThread item = (JMeterThread) iter.next();
                item.stop(); // This is quick
            }
        }
    }

    // Remote exit
View Full Code Here

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.