----- Original Message -----
From: "Mark Brouwer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2000 23:36
Subject: Re: asynchronous tasks


>
>
> James Duncan Davidson wrote:
> >
> > on 2000/06/17 17:08, Rick Yazwinski at [EMAIL PROTECTED] wrote:
> >
> > > Wouldn't this depend on the architecture's implementation of threads?
I'd
> > > expect on a truely multitasking box (Solaris or Linux, for example)
with
> > > multiple processors that you would see a performance improvement.
> >
> > Except that javac runs in a single thread I beleive. You can span a
thread
> > across processors. :)
> >
>
> Correct, however if have never seen the processor load for a single
> javac task above 100/n %, where n is the number of processors on my Sun
> E420

I was thinking last night about how to run javac task do as to get extra
work done on a multiway system. The problem for me is that unlike the simple
C/C++ dependency pipeline, javac uses the outputs of javac (.class files) as
the input to javac. So it would seem unwise to split every compilation of
every file into a separate thread, even if you had CPUs to spare.

You could spin off the single javac thread and run it on its own -and have
it tickle some synchronisation object when it had finished. A later task
could depend not only on the javac task but block until the sync object was
signalled.

A more devious trick would be to have the javac execution component hooked
to ant by a synchronised queue down which build requests were sent, so that
the compile task would just pump off a list of files to build (and a
reference to a sync object). The execution component could then handle
requests from multiple tasks, keeping it busy.

But my build problems arent complex enough to merit any of this work.
Running two different ants on two different build.xml files in two different
windows is adequate multithreading for me.

    -Steve




Reply via email to