Code example for ThreadFactory

Methods: newThread

0
 
	public static final ThreadFactory newCustomThreadFactory(final Customizer customizer) {
		return new ThreadFactory () {
			@Override 
			public Thread newThread(Runnable runnable) {
				Thread thread = defaultThreadFactory.newThread(runnable);
				customizer.apply(thread);
				return thread;
			} 
		}; 
 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java