From: Ben Soares Date: Thu, 19 Oct 2023 20:06:00 +0000 (+0100) Subject: Merge branch 'patch/JAL-4298_synchronize_consoledoc' into bug/JAL-4298_java_console_c... X-Git-Tag: Release_2_11_4_0~132^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5e17ddc59003daff5f9933cf5710889bcdb9e856;p=jalview.git Merge branch 'patch/JAL-4298_synchronize_consoledoc' into bug/JAL-4298_java_console_causing_hang_at_startup --- 5e17ddc59003daff5f9933cf5710889bcdb9e856 diff --cc src/jalview/gui/Console.java index 631e0a2,9fe7195..7e8cbc6 --- a/src/jalview/gui/Console.java +++ b/src/jalview/gui/Console.java @@@ -713,12 -683,16 +713,16 @@@ public class Console extends WindowAdap displayPipe = tmp; } // simply append whole buffer - textArea.append(replace.toString()); // ##### implicated BLOCKED - count += replace.length(); - if (count > byteslim) + synchronized (textArea.getDocument()) { - trimBuffer(false); + textArea.append(replace.toString()); + count += replace.length(); + if (count > byteslim) + { + trimBuffer(false); + } } - ++ } if (displayPipe.length() == 0) {