public class ThreadFactoryTracker extends Object implements ThreadFactory
All user threads are interrupted when the tracker is shutdown.
Runnable implementations (see
Source) must exit the task
if the current thread is interrupted. A handler which notifies the
Executable is invoked when a user thread abruptly terminates due
to an uncaught exception.
ThreadFactory is provided, then this object uses the
factory returned by
|Modifier and Type||Method and Description|
Check to see if there are non daemon user threads that have not yet completed.
Return a thread.
This initiates an orderly shutdown in which no new tasks will be accepted but previously submitted tasks continue to be executed.
Interrupts all user treads and briefly waits for each thread to finish execution.
public void shutdown()
public void shutdownNow()
InterruptedExceptionand exit the task.
public boolean hasActiveNonDaemonThreads()
trueif there are active non daemon threads, false otherwise.
Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.