ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: race conditions in Ant
Date Fri, 05 Oct 2007 10:11:08 GMT
Peter Reilly wrote:
> On 10/5/07, Steve Loughran <> wrote:

>> oh, lots of ambuiguity about ThreadLocal cleanup too: stuff in a
>> ThreadLocal can hang around for the life of a thread
> Yes, this is the issue with IVY.
>> Which means you ought to clean them up when you are finished.
> At least for threadlocals associated with long-lived threads. ThreadLocals
> associated with threads that have ended should be GCed. (However
> there may be bugs with this).
> Peter
>> I've filed this as todo items @work
>> but not looked through ant's code, not yet

only place we use it in SVN_HEAD is in definer, which componentdef, 
taskdef and typedef extend...this creates a stack...this stack would 
leak but its cost is fairly low.

Now, we could add some lifecycle callback; a list of things to invoke at 
the end of a build, definer would register something there on startup, 
and perhaps ivy could add a registration too. Make it harmless to invoke 
more than once, and give the option of adding a weakref as well as a 
hard reference, in case people only want weak lifecycle callbacks. These 
would be pretty low-level events; all errors get caught and logged but 
not propagated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message