diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2007-07-20 18:07:04 +0000 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2007-07-20 18:07:04 +0000 |
commit | 42b7249641797d313102baee0d497a92e393a275 (patch) | |
tree | d0ebb1888b546d73747cbe0760994fff148fa060 /src | |
parent | 71865c906c1f83b6516ce9d4fb54bbc347966a7f (diff) | |
download | cpptasks-parallel-42b7249641797d313102baee0d497a92e393a275.tar.gz cpptasks-parallel-42b7249641797d313102baee0d497a92e393a275.tar.bz2 cpptasks-parallel-42b7249641797d313102baee0d497a92e393a275.tar.xz cpptasks-parallel-42b7249641797d313102baee0d497a92e393a275.zip |
Reduce waiting time for threads
Diffstat (limited to 'src')
-rw-r--r-- | src/net/sf/antcontrib/cpptasks/CCTask.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/sf/antcontrib/cpptasks/CCTask.java b/src/net/sf/antcontrib/cpptasks/CCTask.java index 5116ee7..bd31ccc 100644 --- a/src/net/sf/antcontrib/cpptasks/CCTask.java +++ b/src/net/sf/antcontrib/cpptasks/CCTask.java @@ -806,7 +806,8 @@ public class CCTask extends Task { } } if (alive) { - Thread.sleep(5000); + // wait for a maximum of 5 seconds or #files*2 seconds. + Thread.sleep(Math.min(5000, sourceFiles[0].size()*2000)); } } while (alive); } catch (InterruptedException e) { @@ -997,7 +998,9 @@ public class CCTask extends Task { + rebuildCount + " files compiled..."); System.err.print("\r"); System.err.flush(); - Thread.sleep(5000); + if (!stop) { + Thread.sleep(5000); + } } } catch (InterruptedException e) { } |