You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried the MultiThreadedDAGExecutor with more than one dependency like:
insert(task1, task2);
insert(task2, task3);
insert(task2, task4);
insert(task2, task5);
During excecution the method notifyDone(Runnable task) tries to remove task2 with:
_dependencies.values().remove(task);
This seems not to remove all dependencies for task2, but only one. In docs of Guava it says:
boolean java.util.Collection.remove(Object o):
"Removes a single instance of the specified element from this collection, if it is present (optional operation). "
I tried with:
Iterator<Entry<Runnable, Runnable>> it = _dependencies.entries().iterator();
while (it.hasNext()) {
Entry<Runnable, Runnable> e = it.next();
if (e.getValue().equals(task))
it.remove();
}
That solved the Problem for me.
Kind Regards,
Max
The text was updated successfully, but these errors were encountered:
Hi,
I tried the MultiThreadedDAGExecutor with more than one dependency like:
insert(task1, task2);
insert(task2, task3);
insert(task2, task4);
insert(task2, task5);
During excecution the method notifyDone(Runnable task) tries to remove task2 with:
_dependencies.values().remove(task);
This seems not to remove all dependencies for task2, but only one. In docs of Guava it says:
boolean java.util.Collection.remove(Object o):
"Removes a single instance of the specified element from this collection, if it is present (optional operation). "
I tried with:
Iterator<Entry<Runnable, Runnable>> it = _dependencies.entries().iterator();
while (it.hasNext()) {
Entry<Runnable, Runnable> e = it.next();
if (e.getValue().equals(task))
it.remove();
}
That solved the Problem for me.
Kind Regards,
Max
The text was updated successfully, but these errors were encountered: