소스 검색

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 년 전
부모
커밋
e6076e3434
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6
    0
      src/com/dmdirc/addons/swingdebug/SystemStreamRedirectThread.java

+ 6
- 0
src/com/dmdirc/addons/swingdebug/SystemStreamRedirectThread.java 파일 보기

@@ -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…
취소
저장