| |
|
| java.lang.Object java.lang.Thread de.mcs.utils.ThreadPool
ThreadPool | public class ThreadPool extends Thread (Code) | | this class is intend to implement a thread pool with the possibility to start
and stop all threads and to interact with some other parts of the program.
author: w.klaas |
Constructor Summary | |
public | ThreadPool(int maxcount) instancing the thread pool. |
Method Summary | |
final public boolean | addWorkingPart(Runnable work) Adding a new working part to the queue.
Parameters: work - the runnable to start. | final public boolean | removeWorkingPart(Runnable work) removing a working part from the queue.
Parameters: work - the runnable to remove. | final public void | run() |
ThreadPool | public ThreadPool(int maxcount)(Code) | | instancing the thread pool. With max count of parallel threads.
Parameters: maxcount - maximal count of threads |
addWorkingPart | final public boolean addWorkingPart(Runnable work)(Code) | | Adding a new working part to the queue.
Parameters: work - the runnable to start. true if the work could be added, otherwisefalse |
removeWorkingPart | final public boolean removeWorkingPart(Runnable work)(Code) | | removing a working part from the queue.
Parameters: work - the runnable to remove. true if the work could be removed, otherwisefalse |
|
|
|