/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
return JBossExecutors.resettingExecutor(createTaskFilterRecursive(it));