diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/WriterActiveObject.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/WriterActiveObject.java index 8f63b6487..7646a44b3 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/WriterActiveObject.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/WriterActiveObject.java @@ -12,10 +12,21 @@ public class WriterActiveObject { this.writer = writer; } + public void close(){ + pool.execute(()->{ + try { + writer.close(); + } catch (IOException e) { + System.out.println(e.getMessage()); + } + }); + } + public void write(String message){ pool.execute(()->{ try { writer.write(message); + writer.flush(); } catch (IOException e) { System.out.println(e.getMessage()); }