diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 5c52c237..a23ff422 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -143,7 +143,9 @@ public class TypeUnifyTask extends RecursiveTask>> { rules = new RuleSet(logFile); this.rekTiefeField = rekTiefe; synchronized (this) { noOfThread++; } + writeLog("thNo1 " + thNo); thNo = noOfThread; + writeLog("thNo2 " + thNo); } /** @@ -2053,6 +2055,7 @@ public class TypeUnifyTask extends RecursiveTask>> { } void writeLog(String str) { + synchronized ( this ) { if (log) { try { logFile.write("Thread no.:" + thNo + "\n"); @@ -2066,5 +2069,6 @@ public class TypeUnifyTask extends RecursiveTask>> { System.err.println("kein LogFile"); } } + } } }