Browse Source

Reduce CPU usage of swing debug plugin.

Fixes CLIENT-162

Change-Id: I3d0952d281e77aa78113f7f66a251c78099b6e1a
Reviewed-on: http://gerrit.dmdirc.com/1769
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.5
Greg Holmes 13 years ago
parent
commit
e6076e3434
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/com/dmdirc/addons/swingdebug/SystemStreamRedirectThread.java

+ 6
- 0
src/com/dmdirc/addons/swingdebug/SystemStreamRedirectThread.java View File

@@ -96,6 +96,12 @@ public class SystemStreamRedirectThread implements Runnable {
96 96
                     document.insertString(document.getLength(), rar.readLine(),
97 97
                             null);
98 98
                     document.insertString(document.getLength(), "\n", null);
99
+                } else {
100
+                    try {
101
+                        Thread.sleep(500);
102
+                    } catch (InterruptedException ex) {
103
+                        //Ignore
104
+                    }
99 105
                 }
100 106
             } catch (BadLocationException ex) {
101 107
                 running = false;

Loading…
Cancel
Save