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: [email protected]
For additional commands, e-mail: [email protected]