}
notifier = new ListenerNotifier();
notifier.start();
while(iter.hasNext())
{
ThreadGroup group = (ThreadGroup)iter.next();
threads = new JMeterThread[group.getNumThreads()];
for(int i = 0;running && i < threads.length; i++)
{
ListedHashTree threadGroupTree = (ListedHashTree)searcher.getSubTree(group);
threadGroupTree.add(group,testLevelElements);
threads[i] = new JMeterThread(cloneTree(threadGroupTree),this,notifier);
threads[i].setInitialDelay((int)(((float)(group.getRampUp() * 1000) /
(float)group.getNumThreads()) * (float)i));
threads[i].setThreadName(group.getName()+"-"+(i+1));
Thread newThread = new Thread(threads[i]);
newThread.setName(group.getName()+"-"+(i+1));
allThreads.put(threads[i],newThread);
newThread.start();
}
}
}