|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.ThreadPool
public class ThreadPool
A standard thread pool, accepts runnables and runs them in a thread environment.
Example:
ThreadPool pool = new ThreadPool("MyThreadPool", 20);
pool.start(new YourRunnable());
| Constructor Summary | |
|---|---|
ThreadPool(java.lang.String name,
int poolMaxSize)
Creates a new thread pool. |
|
| Method Summary | |
|---|---|
void |
destroy()
Terminate all threads in the pool. |
void |
start(java.lang.Runnable r)
Push a runnable to the list of runnables. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadPool(java.lang.String name,
int poolMaxSize)
name - - The name of the pool threads.poolMaxSize - - The max. number of threads, must be >= 1.| Method Detail |
|---|
public void start(java.lang.Runnable r)
r - - The runnablepublic void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||