You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2007/10/17 17:36:24 UTC
svn commit: r585540 -
/jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
Author: sebb
Date: Wed Oct 17 08:36:23 2007
New Revision: 585540
URL: http://svn.apache.org/viewvc?rev=585540&view=rev
Log:
Use a single lock Object; ensure all accesses use it
Modified:
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java?rev=585540&r1=585539&r2=585540&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java Wed Oct 17 08:36:23 2007
@@ -58,7 +58,7 @@
private static int globalIteration;
- private static Object counterLock; // ensure counts are updated correctly
+ private static final Object counterLock = new Object(); // ensure counts are updated correctly
/**
* Number of iterations on which we've chosen to deliver samplers.
@@ -217,9 +217,10 @@
}
public void testStarted() {
- globalNumExecutions = 0;
- globalIteration = -1;
- counterLock = new Object();
+ synchronized (counterLock) {
+ globalNumExecutions = 0;
+ globalIteration = -1;
+ }
}
public void testStarted(String host) {
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org