Author: pmouawad
Date: Sat Mar 10 12:57:03 2018
New Revision: 1826401

URL: http://svn.apache.org/viewvc?rev=1826401&view=rev
Log:
Fix misleading javadocs

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

Modified: 
jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java?rev=1826401&r1=1826400&r2=1826401&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java 
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java 
Sat Mar 10 12:57:03 2018
@@ -286,13 +286,13 @@ public abstract class AbstractThreadGrou
     public abstract void waitThreadsStopped();
 
     /**
-     * Ask threads to stop gracefully
+     * This immediately stop threads of Group by interrupting them.
+     * It differs from {@link AbstractThreadGroup#stop()} by being a hard stop
      */
     public abstract void tellThreadsToStop();
 
     /**
-     * This immediately stop threads of Group by interrupting them
-     * It differs from {@link AbstractThreadGroup#tellThreadsToStop()} by 
being a hard stop
+     * This gracefully stops threads of Group
      */
     public abstract void stop();
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java?rev=1826401&r1=1826400&r2=1826401&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java Sat Mar 10 
12:57:03 2018
@@ -372,16 +372,7 @@ public class ThreadGroup extends Abstrac
         allThreads.remove(thread);
     }
 
-    /**
-     * For each thread, invoke:
-     * <ul> 
-     * <li>{@link JMeterThread#stop()} - set stop flag</li>
-     * <li>{@link JMeterThread#interrupt()} - interrupt sampler</li>
-     * <li>{@link Thread#interrupt()} - interrupt JVM thread</li>
-     * </ul> 
-     */
-    @Override
-    public void tellThreadsToStop() {
+    public void tellThreadsToStop(boolean now) {
         running = false;
         if (delayedStartup) {
             try {
@@ -391,11 +382,29 @@ public class ThreadGroup extends Abstrac
             }
         }
 
-        allThreads.forEach((key, value) -> stopThread(key, value, true));
+        allThreads.forEach((key, value) -> stopThread(key, value, now));
     }
 
+    /**
+     * This is an immediate stop interrupting:
+     * <ul>
+     *  <li>current running threads</li>
+     *  <li>current running samplers</li>
+     * </ul>
+     * For each thread, invoke:
+     * <ul> 
+     * <li>{@link JMeterThread#stop()} - set stop flag</li>
+     * <li>{@link JMeterThread#interrupt()} - interrupt sampler</li>
+     * <li>{@link Thread#interrupt()} - interrupt JVM thread</li>
+     * </ul> 
+     */
+    @Override
+    public void tellThreadsToStop() {
+        tellThreadsToStop(true);
+    }
 
     /**
+     * This is a clean shutdown.
      * For each thread, invoke:
      * <ul> 
      * <li>{@link JMeterThread#stop()} - set stop flag</li>


Reply via email to