[concurrency-interest] Soliciting input about removeAllThreadLocals

Joshua Bloch joshua.bloch@sun.com
Sat, 07 Dec 2002 07:50:55 -0800


> Having the underlying ThreadPool implementation for the servlet runner 
> use a removeAllThreadLocals would not break this pattern. 

   I would put this another way: this pattern would not benefit from a 
"service" removes all thread locals -- it has no need of such a service, 
because it takes care of its own thread locals.

   By the way, I don't really understand your beef with the current 
thread local facility (which I happen to like much more than its 
pthreads-era predecessors).  I understand that Java does not provide any 
easy way to, for instance, use ThreadLocals to establish nested dynamic 
scopes, but I think this is an orthogonal issue.