JavaGroups
Class ThreadPool
java.lang.Object
|
+--JavaGroups.ThreadPool
- public class ThreadPool
- extends java.lang.Object
Maintains a set of ReusableThreads. When a thread is to be returned, all existing threads
are checked: when one is available, it will be returned. Otherwise, a new thread is created
and returned, unless the pool limit is reached, in which case null is returned.
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ThreadPool
public ThreadPool(int max_num)
GetThread
public ReusableThread GetThread()
Destroy
public void Destroy()
finalize
public void finalize()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String[] args)