Hi,

enclosed is a (preliminary version of) patch changing NAnt to run
multiple targets in parallel (up to Environment.ProcessorCount * 2 +
1) while taking their dependencies into account. I will be grateful
for any improvement suggestions.

What I know to be broken:
- code formatting is messed up, I don't have Resharper configuration
for NAnt so I just went with what I use. I will fix this later, when
this patch matures a bit
- examining exceptions too deeply may lead to strange results. I did
my best to preserve messages, types and stack traces (by fiddling with
Activator and rethrowing on main thread), however, if the code
examines stack trace lines (as some tests do) - it won't work. The
messeges that are logged, however, contain the proper, original stack
trace, preserver in an InnerException
- logging looks... sketchy. Targets log in parallel, so probably the
only way to prevent their output from mixing is to buffer it until a
target has finished and the dump it all at once. I am not sure this
would preferable over current behaviour.
- some NAnt test report failure and then the build ends with success -
however, clean cvs checkout displays the same behaviour
- some NAnt tests fail randomly - this is a bug. Will look into it later
- number of threads is currently non-twealable so that threading
issues are easier to spot
- task "call" should execute the called target in the same thread,
because the dependencies of the called target are not set

What is not broken:
- my 'other testcase' , i.e. the project I am to paid to work on,
builds (correctly!) taking 50% of the original time on a dual core
machine

Disclaimer: this is unstable and may eat your cat. If it does, please
mail me back so I can fix it :-)

Regards,

Leszek 'skolima' Ciesielski

Attachment: nant_multithreaded_1.diff
Description: Binary data

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to