Package org.apache.jmeter.threads

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();
                    }
View Full Code Here


    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

        // 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();
                    }
View Full Code Here

    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

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

        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

                }
            }
        }
        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

        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

    public boolean stopThread(String threadName, boolean now) {
        for(Entry<JMeterThread, Thread> entry : 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();
                    }
View Full Code Here

    public void tellThreadsToStop() {
        running = false;
        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

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.