From b806fa88ff08408cc9367690fb2f27e532028f06 Mon Sep 17 00:00:00 2001 From: NoName11234 <47484268+NoName11234@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:21:42 +0100 Subject: [PATCH] removed synchronized-block from writeLog() and writeStatistics() in TypeUnifyTask --- .../typeinference/unify/TypeUnifyTask.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 2778fd191..f09e28aa6 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -2609,7 +2609,6 @@ public class TypeUnifyTask extends RecursiveTask>> { } void writeLog(String str) { - synchronized ( this ) { if (log && finalresult) { try { logFile.write("Thread no.:" + thNo + "\n"); @@ -2617,18 +2616,15 @@ public class TypeUnifyTask extends RecursiveTask>> { logFile.write("parallel:" + parallel + "\n"); logFile.write(str+"\n\n"); logFile.flush(); - } - catch (IOException e) { + catch (IOException e) { System.err.println("kein LogFile"); } - } - } + } } void writeStatistics(String str) { if (finalresult) { - synchronized ( this ) { try { statistics.write("Thread No. " + thNo + ": " + str + "\n"); statistics.flush(); @@ -2637,6 +2633,6 @@ public class TypeUnifyTask extends RecursiveTask>> { catch (IOException e) { System.err.println("kein StatisticsFile"); } - }} + } } }