v12/src/PerfHarness/src/com/ibm/uk/hursley/perfharness/ControlThread.java
/**
	 * Signals the given workers to end.  Note that this method does not validate
	 * that the signal is being acted upon.
	 * @param workers The list of workers to peruse.  Providing null implies to use ControlThread.workers.
	 */
Signals the given workers to end.  Note that this method does not validate
that the signal is being acted upon.
@param workers The list of workers to peruse.  Providing null implies to use ControlThread.workers.
Signals the given workers to end . Note that this method does not validate that the signal is being acted upon . @param workers The list of workers to peruse . Providing null implies to use ControlThread . workers .
protected void stopWorkers( Collection<WorkerThread> workers ) {
		if ( workers==null ) {
			workers = this.workers;
		}		
		final Iterator<WorkerThread> iter = workers.iterator();
		while (iter.hasNext()) {
			final WorkerThread worker = iter.next();
			if ( (worker.getStatus()&(WorkerThread.sENDED|WorkerThread.sENDING))==0 ) {
				worker.signalShutdown();
				runningWorkers--; 
			} 
		} 
	}
protected void stopWorkers ( Collection < WorkerThread > workers ) { if ( workers == null ) { workers = this . workers ; } final Iterator < WorkerThread > iter = workers . iterator ( ) ; while ( iter . hasNext ( ) ) { final WorkerThread worker = iter . next ( ) ; if ( ( worker . getStatus ( ) & ( WorkerThread . sENDED | WorkerThread . sENDING ) ) == 0 ) { worker . signalShutdown ( ) ; runningWorkers -- ; } } }
Signals the given workers to end.
Signals the given workers to end .
// if not ending // this may not be accurate if the thread ignores the signal // end if ! ending // end while