<div dir="ltr">On Thu, 27 Sep 2018 at 11:45, Joachim Durchholz <<a href="mailto:jo@durchholz.org">jo@durchholz.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">(I am pretty unconvinced that thread pools are a great idea. Essentially <br>
you need to wipe all thread-local storage before you can reuse a thread <br>
from the pool, and I'm somewhat sceptical that this is still worth it.)<br></blockquote><div><br></div><div>My typical use case for thread pools nowadays is to run a reactive streams thread pool. Each Rx library needs its own arbitrary context data API, though, in order to support this sort of thing at an API level. Otherwise, what I've done in the past was to wrap the executors with a class that propagates any thread-local data needed (usually the authentication context and MDC).</div><div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Matt Sicker <<a href="mailto:boards@gmail.com" target="_blank">boards@gmail.com</a>></div></div>