>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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to