public class ClassLoaderSanityThreadFactory extends Object implements ThreadFactory
Thread.contextClassLoaderfor threads it creates to its own classloader. This avoids issues where threads are lazily created (ex by invoking
ScheduledExecutorService.schedule(Runnable, long, TimeUnit)) in a context where they would receive a customized
Thread.contextClassLoaderthat was never meant to be used. Commonly this is a problem for Groovy use, where this may result in memory leaks.
|Constructor and Description|
Copyright © 2004–2019. All rights reserved.