Bläddra i källkod

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 år sedan
förälder
incheckning
e6076e3434

+ 6
- 0
src/com/dmdirc/addons/swingdebug/SystemStreamRedirectThread.java Visa fil

96
                     document.insertString(document.getLength(), rar.readLine(),
96
                     document.insertString(document.getLength(), rar.readLine(),
97
                             null);
97
                             null);
98
                     document.insertString(document.getLength(), "\n", null);
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
             } catch (BadLocationException ex) {
106
             } catch (BadLocationException ex) {
101
                 running = false;
107
                 running = false;

Laddar…
Avbryt
Spara