You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/11/02 20:01:12 UTC
svn commit: r1030176 - in
/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs:
cache/SoftRefFilesCache.java impl/DefaultFileMonitor.java
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.