[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners UniversalFileSystemMiner.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners
In directory dev1:/tmp/cvs-serv22298/miners/org/eclipse/rse/dstore/universal/miners

Modified Files:
      Tag: R3_0_maintenance
	UniversalFileSystemMiner.java 
Log Message:
Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect


Index: UniversalFileSystemMiner.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java,v
retrieving revision 1.45.2.6
retrieving revision 1.45.2.7
diff -C2 -d -r1.45.2.6 -r1.45.2.7
*** UniversalFileSystemMiner.java	13 Feb 2012 21:09:50 -0000	1.45.2.6
--- UniversalFileSystemMiner.java	24 May 2012 20:13:26 -0000	1.45.2.7
***************
*** 44,47 ****
--- 44,48 ----
   * David McKnight  (IBM)  - [369941] [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
   * David McKnight   (IBM) - [371401] [dstore][multithread] avoid use of static variables - causes memory leak after disconnect
+  * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
   *******************************************************************************/
  
***************
*** 55,58 ****
--- 56,60 ----
  import java.util.Iterator;
  import java.util.List;
+ import java.util.Set;
  import java.util.StringTokenizer;
  
***************
*** 1360,1364 ****
  
  	public void finish() {
! 		//_archiveHandlerManager.dispose();
  		super.finish();
  	}
--- 1362,1385 ----
  
  	public void finish() {
! 		try {
! 			if (_cancellableThreads != null) {
! 				Set keys = _cancellableThreads.keySet();
! 				Iterator iteratorKeys = keys.iterator();
! 				while (iteratorKeys.hasNext()) {
! 					Object key = iteratorKeys.next();
! 					ICancellableHandler thread = (ICancellableHandler) _cancellableThreads.get(key);
! 					if (thread != null) {
! 						if (!thread.isDone()) {
! 							thread.cancel();
! 						}
! 					}
! 				}
! 				
! 				_cancellableThreads.clear();
! 			}
! 		}
! 		catch(Throwable e) {
! 			e.printStackTrace();
! 		}
  		super.finish();
  	}