tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r883200 - in /tomcat/trunk/java/org/apache/catalina/tribes: group/GroupChannel.java group/interceptors/MessageDispatchInterceptor.java group/interceptors/TcpPingInterceptor.java membership/McastServiceImpl.java
Date Mon, 23 Nov 2009 00:31:43 GMT
Author: markt
Date: Mon Nov 23 00:31:43 2009
New Revision: 883200

URL: http://svn.apache.org/viewvc?rev=883200&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48248
Use volatile since field is accessed by multiple threads

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
    tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=883200&r1=883199&r2=883200&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Mon Nov 23 00:31:43
2009
@@ -644,7 +644,7 @@
             return counter++;
         }
 
-        protected boolean doRun = true;
+        protected volatile boolean doRun = true;
         protected GroupChannel channel;
         protected long sleepTime;
         public HeartbeatThread(GroupChannel channel, long sleepTime) {

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=883200&r1=883199&r2=883200&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
Mon Nov 23 00:31:43 2009
@@ -42,7 +42,7 @@
 
     protected long maxQueueSize = 1024*1024*64; //64MB
     protected FastQueue queue = new FastQueue();
-    protected boolean run = false;
+    protected volatile boolean run = false;
     protected Thread msgDispatchThread = null;
     protected long currentSize = 0;
     protected boolean useDeepClone = true;

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=883200&r1=883199&r2=883200&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
Mon Nov 23 00:31:43 2009
@@ -52,7 +52,7 @@
 
     protected boolean useThread = false;
     protected boolean staticOnly = false;
-    protected boolean running = true;
+    protected volatile boolean running = true;
     protected PingThread thread = null;
     protected static AtomicInteger cnt = new AtomicInteger(0);
     

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=883200&r1=883199&r2=883200&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java Mon Nov
23 00:31:43 2009
@@ -57,8 +57,8 @@
     /**
      * Internal flag used for the listen thread that listens to the multicasting socket.
      */
-    protected boolean doRunSender = false;
-    protected boolean doRunReceiver = false;
+    protected volatile boolean doRunSender = false;
+    protected volatile boolean doRunReceiver = false;
     protected int startLevel = 0;
     /**
      * Socket that we intend to listen to
@@ -575,7 +575,7 @@
     }//class SenderThread
 
     protected static class RecoveryThread extends Thread {
-        static boolean running = false;
+        static volatile boolean running = false;
         McastServiceImpl parent = null;
         public RecoveryThread(McastServiceImpl parent) {
             this.parent = parent;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message