[concurrency-interest] reusing threads and thread local state

Larry Riedel larryr at saturn.sdsu.edu
Sat Apr 30 16:29:34 EDT 2005


> > It seems to me plainly reasonable to ask to be able to
> > iterate through all the ThreadLocals associated with a
> > particular Thread, as well as to be able to clear each
> > one found via iteration, regardless of whether there
> > is a provided method which promises to clear all the
> > ThreadLocals, or whether clearing them would (not) put
> > the Thread in a pristine state.
>
> [...] It's equally reasonable to ask to iterate through
> all of the fields contained in an instance

I agree that is conceptually similar.


> (whatever their access level).

I think when policy dictates, method(s) providing
mechanisms for accessing ThreadLocals in this manner
should of course support the throwing of appropriate
exceptions such as IllegalAccessException.


Larry



More information about the Concurrency-interest mailing list