If threads created by the executor have a reference to the context classloader this may cause a leak. See: https://wiki.apache.org/tomcat/MemoryLeakProtection#cclThreadSpawnedByWebApp Bug: 517107 Change-Id: If79c1ebd3f9cf733fd88a5fce38fd46ff0d08d10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>tags/v4.11.0.201803080745-r
public Thread newThread(Runnable taskBody) { | public Thread newThread(Runnable taskBody) { | ||||
Thread thr = baseFactory.newThread(taskBody); | Thread thr = baseFactory.newThread(taskBody); | ||||
thr.setName("JGit-WorkQueue"); //$NON-NLS-1$ | thr.setName("JGit-WorkQueue"); //$NON-NLS-1$ | ||||
thr.setContextClassLoader(null); | |||||
thr.setDaemon(true); | thr.setDaemon(true); | ||||
return thr; | return thr; | ||||
} | } |