Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2002-04-06 17:47:37 -0500
committerDarin Wright2002-04-06 17:47:37 -0500
commit26ee3b5b33366ec5b3488e5aabce9a01c83d3fc4 (patch)
treed02dced444a088f9a9734cab8a955364694a4970 /org.eclipse.debug.core
parent79335fbb2563da8f37e2ba0f4e3e42cff3ab7173 (diff)
downloadeclipse.platform.debug-26ee3b5b33366ec5b3488e5aabce9a01c83d3fc4.tar.gz
eclipse.platform.debug-26ee3b5b33366ec5b3488e5aabce9a01c83d3fc4.tar.xz
eclipse.platform.debug-26ee3b5b33366ec5b3488e5aabce9a01c83d3fc4.zip
bug 8772
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java27
1 files changed, 7 insertions, 20 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
index d9c123ff2..7013afffc 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
@@ -46,11 +46,6 @@ public class OutputStreamMonitor implements IStreamMonitor {
private static final int BUFFER_SIZE= 8192;
/**
- * The base number of milliseconds to pause
- * between reads.
- */
- private static final long BASE_DELAY= 50L;
- /**
* Whether or not this monitor has been killed.
* When the monitor is killed, it stops reading
* from the stream immediately.
@@ -119,30 +114,22 @@ public class OutputStreamMonitor implements IStreamMonitor {
*/
private void read() {
byte[] bytes= new byte[BUFFER_SIZE];
- while (true) {
+ int read = 0;
+ while (read >= 0) {
try {
if (fKilled) {
break;
}
- if (fStream.available() == 0) {
- if (fThread == null)
- break;
- } else {
- int read= fStream.read(bytes);
- if (read > 0) {
- String text= new String(bytes, 0, read);
- fContents.append(text);
- fireStreamAppended(text);
- }
+ read= fStream.read(bytes);
+ if (read > 0) {
+ String text= new String(bytes, 0, read);
+ fContents.append(text);
+ fireStreamAppended(text);
}
} catch (IOException ioe) {
DebugPlugin.log(ioe);
return;
}
- try {
- Thread.sleep(BASE_DELAY);
- } catch (InterruptedException ie) {
- }
}
}

Back to the top