git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca16018
)
JAL-4298 avoid deadlock waiting to update doc when doc is being used by gui thread...
author
James Procter
<j.procter@dundee.ac.uk>
Thu, 19 Oct 2023 17:33:57 +0000
(18:33 +0100)
committer
James Procter
<j.procter@dundee.ac.uk>
Thu, 19 Oct 2023 17:33:57 +0000
(18:33 +0100)
src/jalview/gui/Console.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Console.java
b/src/jalview/gui/Console.java
index
6a6cb56
..
9fe7195
100644
(file)
--- a/
src/jalview/gui/Console.java
+++ b/
src/jalview/gui/Console.java
@@
-683,12
+683,16
@@
public class Console extends WindowAdapter
displayPipe = tmp;
}
// simply append whole buffer
- textArea.append(replace.toString());
- 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)
{