----- Original message -----
> On 19/05/2010 13:06, Alex Objelean wrote:
> This currently make web-classloader leaks. If you start using
> InheritableThreadLocal's with arbitrary objects, you're going to make
> even more leaks.
>
> Also note, there is something not good here. AFAIK, Wicket sets the
> thread locals only during the request. But if child threads are spawned,
> they can't be cleaned automatically. IMO, it should be done something
> that the user needs to call to set/clear this, like a specialized
> WicketThread class.

And when should that one clean up the threadlocal??
What would be a good time to clean it up?

There would only be 1 place thats when then run method is finished. But if 
thats the case the thread and the threadlocals are cleared any way.

if you would use a thread pool then you have to use otherways any way to se the 
Application threadlocal. Thread pools have call backs when a runnable is being 
executed and finished.

But threads that are created in a request should finish and terminate at one 
point and never be reused.

Reply via email to