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.


Constructor Summary
ThreadPool(int max_num)
           
 
Method Summary
 void Destroy()
           
 void finalize()
           
 ReusableThread GetThread()
           
static void main(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool(int max_num)
Method Detail

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)