code: public boolean canTerminate()
  	{
  		synchronized (threads)
  		{
  			IThread[] ths = getThreads();
  
  			if (ths.length == 0)
  			{
  				if (waitingForThreads)
  				{
  					return true;
  				} else
  				{
  					return false;
  				}
  			}
  
  			for (int i = 0; i < ths.length; ++i)
  			{
  				if (!ths[i].canTerminate())
  				{
  					return false;
  				}
  			}
  
  			return true;
  		}
  	}
docs: ITerminate