On Sat, May 22, 2010 at 2:32 PM, Douglas Ferguson <
doug...@douglasferguson.us> wrote:

> Under what circumstances does this become a problem?
>
> I'm just curious about more details on this comment:
>
> "The end result is that it does not break any existing applications that
> don't already have a bug"
>
>
Please see the other threads for more details.  In short, there is a Java
bug that if you are manipulating images, it may not clean up Java2D threads
correctly.  There is a known workaround - initializing a cleanup thread
yourself.  But, if you aren't doing this, and you start threads that
manipulate images, and you redeploy without a restart, then you leak those
threads.  (You can see this is a pretty rare case).  Now, never before would
we have put anything that consumes memory into your threads automatically.
 But, with the InheritableThreadLocal, the Application will
get propagated to these threads.  So, if you already had the existing bug of
leaking threads, now we've added something that will also leak your memory
with those threads.  So, "it does not break any existing applications that
don't already have a bug" - the thread leaking bug.  But, it can make the
existing bug worse (or, you could see it as a nice thing - it brings it to
your attention if you weren't aware of it :)

--
Jeremy Thomerson
http://www.wickettraining.com

Reply via email to