@Deprecated
public class WorkThreadPool
extends java.lang.Object
ThreadUtilities
Constructor and Description |
---|
WorkThreadPool(java.lang.String name,
int count)
Deprecated.
Creates a new work thread pool with the specified number of
work threads.
|
Modifier and Type | Method and Description |
---|---|
void |
addProgressListener(WorkThreadProgressListener listener)
Deprecated.
Adds a progress listener to this thread pool.
|
void |
addWorkRequest(java.lang.Runnable run,
boolean inAWT)
Deprecated.
Adds a work request to the queue.
|
int |
getRequestCount()
Deprecated.
Returns the number of pending requests.
|
WorkThread |
getThread(int index)
Deprecated.
Returns the specified thread.
|
int |
getThreadCount()
Deprecated.
Returns the number of threads in this pool.
|
void |
removeProgressListener(WorkThreadProgressListener listener)
Deprecated.
Removes a progress listener from this thread pool.
|
void |
start()
Deprecated.
Starts all the threads in this thread pool.
|
void |
waitForRequests()
Deprecated.
Waits until all requests are complete.
|
public WorkThreadPool(java.lang.String name, int count)
name
- The thread name prefixcount
- The number of work threadspublic void start()
public void addWorkRequest(java.lang.Runnable run, boolean inAWT)
Runnable
is executed directly: if inAWT
is true
and the queue is empty
at the moment of call.run
- The runnableinAWT
- If true, will be executed in AWT thread. Otherwise,
will be executed in work thread.public void waitForRequests()
public int getRequestCount()
public int getThreadCount()
public WorkThread getThread(int index)
index
- The index of the threadpublic void addProgressListener(WorkThreadProgressListener listener)
listener
- The listenerpublic void removeProgressListener(WorkThreadProgressListener listener)
listener
- The listener