ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Pellow <n...@cortexebusiness.com.au>
Subject Re: [submit] A build sound alert Task
Date Mon, 04 Dec 2000 22:55:28 GMT


KC Baltz wrote:
> 
> Have some bad news to report about this task.  With some quick benchmarking,
> it appears to significantly increase my build times.  I noticed that your
> run() method in AntSoundPlayer has the following:
> 
> while( true ) {
> }


This was left in by accident when I had it playing background
build music. The SoundTask does not in fact require a new Thread for
simple build alerts at the
end of the build. So I have removed that line of code from SoundTasks
execute method.

Please find attached the corrected code. It simply registers a build
listener in the execute
method and does not start any new threads!

Regards, 
Nick Pellow


> 
> I replaced that with the following to make it a bit more efficient.
> 
>         while( true ) {
>         try {
>           Thread.sleep(1000);
>         } catch( InterruptedException ex ) {
> 
>         }
>         }
> Didn't know if this was committed yet, so I didn't figure a patch was in
> order.  Perhaps there was some reason having to do with the sound playing
> code that this kind of loop wouldn't work?
> 
> K.C.
Mime
View raw message