Debugabfrage entfernt, die Exception ausgeloest hat

modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java
Methoden synchronized gemacht
This commit is contained in:
Martin Plümicke 2019-05-12 19:15:26 +02:00
parent d14406e474
commit c3c0a11572
2 changed files with 3 additions and 6 deletions

View File

@ -179,7 +179,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
catch (IOException e) {
System.err.println("log-File nicht vorhanden");
}
/* Abbruchtest
/*Abbruchtest
if (thNo > 10) {
System.out.println("cancel");
usedTasks.cancel();
@ -1110,9 +1110,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) {
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
result = res;
if (res.iterator().next() instanceof WildcardType) {
System.out.println("");
}
}
else {
if ((isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result))

View File

@ -6,11 +6,11 @@ public class UnifyTaskModel {
ArrayList<TypeUnifyTask> usedTasks = new ArrayList<>();
public void add(TypeUnifyTask t) {
public synchronized void add(TypeUnifyTask t) {
usedTasks.add(t);
}
public void cancel() {
public synchronized void cancel() {
for(TypeUnifyTask t : usedTasks) {
t.myCancel(true);
}