if (!isRunning()) {
throw new IllegalArgumentException(
"Component that created this thread factory is no longer running");
}
Runnable managedRunnable = new ManagedRunnable(runnable, this.managedContext, true);
Thread thread = super.newThread(managedRunnable);
return thread;
}