private synchronized boolean startDequeue(){
  int threads=Math.min(queue.size(),maxThreads);
  for (int i=0; i < threads; i++) {
    ResourceThread t=(ResourceThread)queue.firstElement();
    queue.removeElementAt(0);
    running.addElement(t);
    threadCount++;
  }
  for (Enumeration e=running.elements(); e.hasMoreElements(); ) {
    ResourceThread t=(ResourceThread)e.nextElement();
    t.go();
  }
  return (threads > 0);
}

private synchronized boolean startDequeue ( ) { int threads = Math . min ( queue . size ( ) , maxThreads ) ; for ( int i = 0 ; i < threads ; i ++ ) { ResourceThread t = ( ResourceThread ) queue . firstElement ( ) ; queue . removeElementAt ( 0 ) ; running . addElement ( t ) ; threadCount ++ ; } for ( Enumeration e = running . elements ( ) ; e . hasMoreElements ( ) ; ) { ResourceThread t = ( ResourceThread ) e . nextElement ( ) ; t . go ( ) ; } return ( threads > 0 ) ; }
starts dequeuing the queue into the running pool and launch them
