Propagating ThreadLocal to a new Thread fetched from a ExecutorService
The set of ThreadLocal instances associated with a thread are held in private members of each Thread. Your only chance to enumerate these is to do some reflection on the Thread; this way, you can override the access restrictions on the thread’s fields. Once you can get the set of ThreadLocal, you could copy in … Read more