public class ThreadManager extends Object
Constructor and Description |
---|
ThreadManager() |
Modifier and Type | Method and Description |
---|---|
int |
activeCount() |
void |
interruptAll()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Attempts to stop running threads. |
boolean |
joinAll(long maxWaitMillis)
Wait for any executing background threads to complete.
|
int |
startThread(Runnable job,
String label)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Starts a new job on a background thread. |
void |
stopThread(int threadID)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Stops a thread that was started in this thread manager. |
String |
toString() |
public int activeCount()
public int startThread(Runnable job, String label)
job
- The job to startlabel
- a job descriptionstopThread(int)
public void stopThread(int threadID)
threadID
- the ID of the thread to stoppublic boolean joinAll(long maxWaitMillis)
maxWaitMillis
- The maximum time that should be waited, in milliseconds.
This is not an exact time but will be fairly close.public void interruptAll()
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.