[concurrency-interest] Soliciting input about removeAllThreadLocals

Dawid Kurzyniec dawidk@mathcs.emory.edu
Tue, 10 Dec 2002 04:24:13 -0500


> P.S.  I admit that InheritableThreadLocal was a bit speculative but I
> think it has proven useful to a number of people.

Yes, I am one of those people. In my system, code within a given JVM may be 
executed on behalf on many users at the same time. Every thread thus runs 
within a context of a session (containing information about the authenticated 
principal, or owner). This session info is stored as a private static thread 
local. If security policy permits this, threads may spawn another threads 
that must then inherit that session info. Without inheritable thread locals, 
implementing such a thing would be quite difficult considering the fact that 
the code spawning a new thread may be supplied by a third party.

Regards,
Dawid