[concurrency-interest] Thread Pools and ThreadLocal

Joshua Bloch josh at bloch.us
Mon Mar 19 20:48:34 EDT 2007


Nope.  This question comes up once every year, like clockwork.  If you want
a new thread,  type new Thread(); Thread pool threads are cheaper, and they
may have a few dents and dings.  You get what you pay for.

      Josh


On 3/19/07, Joseph Seigh <jseigh_cp00 at xemaps.com> wrote:
>
> Any way to purge or reset ThreadLocal variables for threads in
> a thread pool before they're reused?  The assumption is the
> thread pool implementation doesn't know which ones are being
> used by the executed tasks.
>
> --
> Joe Seigh
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070319/ed139914/attachment.html 


More information about the Concurrency-interest mailing list