Peter Reilly wrote:
On 10/5/07, Steve Loughran <[EMAIL PROTECTED]> 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.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6209042
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
http://jira.smartfrog.org/jira/browse/SFOS-469
http://jira.smartfrog.org/jira/browse/SFOS-470
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]