|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.thread.ThreadPool
public class ThreadPool
A simple thread pool.
| Constructor Summary | |
|---|---|
ThreadPool(int max,
java.lang.String name)
Creates a new instance of ThreadPool max is the maximum number of threads the pool can have. |
|
| Method Summary | |
|---|---|
void |
runTask(java.lang.Runnable task)
Run the given task. |
void |
shutDown()
Shutdown the thread pool. |
void |
waitForAll()
returns when all tasks run through the runTask method have finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadPool(int max,
java.lang.String name)
| Method Detail |
|---|
public void runTask(java.lang.Runnable task)
public void waitForAll()
public void shutDown()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||