[slf4j-user] Would MDC mess up when used with Java Thread Pool Executor
Matt Sicker
boards at gmail.com
Thu Sep 27 20:24:08 CEST 2018
On Thu, 27 Sep 2018 at 11:45, Joachim Durchholz <jo at durchholz.org> wrote:
> (I am pretty unconvinced that thread pools are a great idea. Essentially
> you need to wipe all thread-local storage before you can reuse a thread
> from the pool, and I'm somewhat sceptical that this is still worth it.)
>
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).
--
Matt Sicker <boards at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20180927/22c33f86/attachment.html>
More information about the slf4j-user
mailing list