Author: sebb
Date: Tue Nov  2 19:01:11 2010
New Revision: 1030176

URL: http://svn.apache.org/viewvc?rev=1030176&view=rev
Log:
VFS-326 Multi-threading issues - fix inter-thread communication issues

Modified:
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java?rev=1030176&r1=1030175&r2=1030176&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
 Tue Nov  2 19:01:11 2010
@@ -62,7 +62,7 @@ public class SoftRefFilesCache extends A
      */
     private final class SoftRefReleaseThread extends Thread
     {
-        private boolean requestEnd;
+        private volatile boolean requestEnd; // used for inter-thread 
communication
 
         private SoftRefReleaseThread()
         {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java?rev=1030176&r1=1030175&r2=1030176&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
 Tue Nov  2 19:01:11 2010
@@ -111,7 +111,7 @@ public class DefaultFileMonitor implemen
     /**
      * A flag used to determine if the monitor thread should be running.
      */
-    private boolean shouldRun = true;
+    private volatile boolean shouldRun = true; // used for inter-thread 
communication
 
     /**
      * A flag used to determine if adding files to be monitored should be 
recursive.


Reply via email to