You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/09/02 22:38:11 UTC
svn commit: r1380051 -
/jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
Author: pmouawad
Date: Sun Sep 2 20:38:11 2012
New Revision: 1380051
URL: http://svn.apache.org/viewvc?rev=1380051&view=rev
Log:
make fields final
remove unused parameter numThreads
Modified:
jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
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=1380051&r1=1380050&r2=1380051&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java Sun Sep 2 20:38:11 2012
@@ -76,7 +76,7 @@ public class ThreadGroup extends Abstrac
private transient Thread threadStarter;
// List of active threads
- private Map<JMeterThread, Thread> allThreads = new ConcurrentHashMap<JMeterThread, Thread>();
+ private final Map<JMeterThread, Thread> allThreads = new ConcurrentHashMap<JMeterThread, Thread>();
/**
* Is test (still) running?
@@ -285,7 +285,7 @@ public class ThreadGroup extends Abstrac
long now = System.currentTimeMillis(); // needs to be same time for all threads in the group
final JMeterContext context = JMeterContextService.getContext();
for (int i = 0; running && i < numThreads; i++) {
- JMeterThread jmThread = makeThread(groupCount, notifier, threadGroupTree, engine, numThreads, i, context);
+ JMeterThread jmThread = makeThread(groupCount, notifier, threadGroupTree, engine, i, context);
scheduleThread(jmThread, now); // set start and end time
jmThread.setInitialDelay((int)(i * perThreadDelay));
Thread newThread = new Thread(jmThread, jmThread.getThreadName());
@@ -307,7 +307,7 @@ public class ThreadGroup extends Abstrac
private JMeterThread makeThread(int groupCount,
ListenerNotifier notifier, ListedHashTree threadGroupTree,
- StandardJMeterEngine engine, int numThreads, int i,
+ StandardJMeterEngine engine, int i,
JMeterContext context) { // N.B. Context needs to be fetched in the correct thread
boolean onErrorStopTest = getOnErrorStopTest();
boolean onErrorStopTestNow = getOnErrorStopTestNow();
@@ -557,7 +557,7 @@ public class ThreadGroup extends Abstrac
if (usingScheduler && System.currentTimeMillis() > endtime) {
break; // no point continuing beyond the end time
}
- JMeterThread jmThread = makeThread(groupCount, notifier, threadGroupTree, engine, numThreads, i, context);
+ JMeterThread jmThread = makeThread(groupCount, notifier, threadGroupTree, engine, i, context);
jmThread.setInitialDelay(0); // Already waited
if (usingScheduler) {
jmThread.setScheduled(true);