modified: src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java

This commit is contained in:
Martin Plümicke 2019-01-18 00:54:43 +01:00
parent 38d4481756
commit cf951043ef

View File

@ -143,7 +143,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
rules = new RuleSet(logFile); rules = new RuleSet(logFile);
this.rekTiefeField = rekTiefe; this.rekTiefeField = rekTiefe;
synchronized (this) { noOfThread++; } synchronized (this) { noOfThread++; }
writeLog("thNo1 " + thNo);
thNo = noOfThread; thNo = noOfThread;
writeLog("thNo2 " + thNo);
} }
/** /**
@ -2053,6 +2055,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
} }
void writeLog(String str) { void writeLog(String str) {
synchronized ( this ) {
if (log) { if (log) {
try { try {
logFile.write("Thread no.:" + thNo + "\n"); logFile.write("Thread no.:" + thNo + "\n");
@ -2066,5 +2069,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
System.err.println("kein LogFile"); System.err.println("kein LogFile");
} }
} }
}
} }
} }