-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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