On 10/28/2009 10:54 PM, Konstantin Kolinko wrote:
2009/10/28<[email protected]>:
Author: markt
Date: Wed Oct 28 15:30:49 2009
New Revision: 830589


+        if (endpoint.getCurrentThreadsBusy()>0&&
+                endpoint.getMaxThreads()>0) {
+            threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
+                    / endpoint.getMaxThreads();
+        }
I think that endpoint.getCurrentThreadsBusy() call is not cheap
in trunk, this is cheap if they are using the executor that comes with Tomcat. It's a read from a volatile variable.

  (and
can provide different results between calls). It would be better to
cache its result in a local variable.
in trunk, this call will go away in the processor, as the processor no longer needs to control this.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to