You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/12/23 22:11:49 UTC
svn commit: r1222852 -
/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java
Author: markt
Date: Fri Dec 23 21:11:49 2011
New Revision: 1222852
URL: http://svn.apache.org/viewvc?rev=1222852&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52354
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52355
Make debug flags volatile as they are accessed by multiple threads
Modified:
tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java
Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java?rev=1222852&r1=1222851&r2=1222852&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java Fri Dec 23 21:11:49 2011
@@ -59,14 +59,12 @@ public class FastQueue {
/**
* check lock to detect strange threadings things
*/
- private boolean checkLock = false;
+ private volatile boolean checkLock = false;
-
- private boolean inAdd = false;
-
- private boolean inRemove = false;
-
- private boolean inMutex = false;
+ // Flags used to detect unexpected state
+ private volatile boolean inAdd = false;
+ private volatile boolean inRemove = false;
+ private volatile boolean inMutex = false;
/**
* limit the queue length ( default is unlimited)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org