ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: svn commit: r577308 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs: ProcessDestroyer.java RecorderEntry.java Redirector.java Sleep.java StreamPumper.java Tar.java Zip.java
Date Thu, 20 Sep 2007 11:35:13 GMT
These are good suggestions.

Peter

On 9/20/07, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> wrote:
> >Yes, It is difficult to come up with good names....
>
> I know ...
> But maybe we could find any together.
>
>
> >When I see wait(1000), my brain translates this it wait
> >for a signal, but if it does not happen in a second,
> >give up.
> >
> >So in this case, one second as a name sounds reasonable
> >(or at least better than 1000).
>
> I such cases I would write 20*1000. If you change the value of that
> constants its name
> would be confusing...
>   TWENTY_SECONDS = 30000;
>
>
>
>
> >>ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer
> .java
> >> > class ProcessDestroyer implements Runnable {
> >> >-
> >> >-                destroyProcessThread.join(20000);
> >> >+                destroyProcessThread.join(TWENTY_SECONDS);
>
>
> JavaDoc of Thread.join(long):
> "Waits at most millis milliseconds for this thread to die. A timeout of
> 0 means to wait forever."
>
> What about THREAD_DIE_TIMEOUT ?
>
>
> >> > public class Redirector {
> >> >+    private static final int ONE_SECOND = 1000;
> >> >
> >> >-                wait(1000);
> >> >+                wait(ONE_SECOND);
>
>
>
> Redirector:
>         //wait for the StreamPumpers to finish
>         while (threadGroup.activeCount() > 0) {
>
> so what about WAIT_INTERVAL or STREAMPUMPER_WAIT_INTERVAL ?
>
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message