Browse Source

Remove sleep from the stream pumper. I can't see the reason for this.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274001 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
c71436048a
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      src/main/org/apache/tools/ant/taskdefs/StreamPumper.java

+ 2
- 5
src/main/org/apache/tools/ant/taskdefs/StreamPumper.java View File

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2000,2002 The Apache Software Foundation. All rights
* Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved. * reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,6 @@ public class StreamPumper implements Runnable {
// TODO: make SIZE and SLEEP instance variables. // TODO: make SIZE and SLEEP instance variables.
// TODO: add a status flag to note if an error occured in run. // TODO: add a status flag to note if an error occured in run.


private static final int SLEEP = 5;
private static final int SIZE = 128; private static final int SIZE = 128;
private InputStream is; private InputStream is;
private OutputStream os; private OutputStream os;
@@ -104,11 +103,9 @@ public class StreamPumper implements Runnable {
try { try {
while ((length = is.read(buf)) > 0) { while ((length = is.read(buf)) > 0) {
os.write(buf, 0, length); os.write(buf, 0, length);
try {
Thread.sleep(SLEEP);
} catch (InterruptedException e) {}
} }
} catch (IOException e) { } catch (IOException e) {
// ignore errors
} finally { } finally {
synchronized (this) { synchronized (this) {
finished = true; finished = true;


Loading…
Cancel
Save