mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 22:45:23 +02:00
[dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
This commit is contained in:
parent
6ba0c4e8ba
commit
af14f6c078
2 changed files with 5 additions and 18 deletions
|
@ -449,7 +449,10 @@ public class UniversalFileSystemMiner extends Miner {
|
||||||
updateCancellableThreads(status.getParent(), queryThread);
|
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
|
//First Check to make sure that there are no "zombie" threads
|
||||||
Iterator iter = _cancellableThreads.keySet().iterator();
|
Iterator iter = _cancellableThreads.keySet().iterator();
|
||||||
|
|
|
@ -70,23 +70,7 @@ public class UniversalDownloadHandler extends SecuredThread implements ICancella
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeFromCancellableList(){
|
private void removeFromCancellableList(){
|
||||||
Class clazz = _miner.getClass();
|
_miner.updateCancellableThreads(_status.getParent(), this);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDone()
|
public boolean isDone()
|
||||||
|
|
Loading…
Add table
Reference in a new issue