1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 22:25:25 +02:00

[dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM

This commit is contained in:
David McKnight 2012-02-02 14:26:54 +00:00
parent 6ba0c4e8ba
commit af14f6c078
2 changed files with 5 additions and 18 deletions

View file

@ -449,7 +449,10 @@ public class UniversalFileSystemMiner extends Miner {
updateCancellableThreads(status.getParent(), queryThread);
}
private void updateCancellableThreads(DataElement command, ICancellableHandler thread)
/**
* @since 3.2
*/
public void updateCancellableThreads(DataElement command, ICancellableHandler thread)
{
//First Check to make sure that there are no "zombie" threads
Iterator iter = _cancellableThreads.keySet().iterator();

View file

@ -70,23 +70,7 @@ public class UniversalDownloadHandler extends SecuredThread implements ICancella
}
private void removeFromCancellableList(){
Class clazz = _miner.getClass();
try {
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++){
Method method = methods[i];
if (method.getName().equals("updateCancellableThreads")){ //$NON-NLS-1$
method.setAccessible(true);
Object[] args = { _status.getParent(), this };
method.invoke(_miner, args);
return;
}
}
} catch (Exception e) {
_dataStore.trace(e);
}
_miner.updateCancellableThreads(_status.getParent(), this);
}
public boolean isDone()