public boolean startSomeWorkers(int numberOfWorkers) throws EngineException {

		final int numberToStart = Math.min(numberOfWorkers, m_workers.length - m_nextWorkerIndex);

		for (int i = 0; i < numberToStart; ++i) {
			final int workerIndex = m_nextWorkerIndex;

			final Worker worker = m_workerFactory.create(errStream, errStream);

			synchronized (m_workers) {
				m_workers[workerIndex] = worker;
			}

			try {
				m_executor.execute(new InterruptibleRunnableAdapter(new WaitForWorkerTask(workerIndex)));
			} catch (RejectedExecutionException e) {
				m_logger.error("Failed to wait for " + worker.getIdentity().getName(), e);
				worker.destroy();
				return false;
			}

			m_logger.info("worker " + worker.getIdentity().getName() + " started");

			++m_nextWorkerIndex;
		}

		return m_workers.length > m_nextWorkerIndex;
	}
Start some of all workers.

@param numberOfWorkers worker count
@return true if all workers is not available.
@throws EngineException engine exception
ngrinder-core/src/main/java/net/grinder/engine/agent/ErrorStreamRedirectWorkerLauncher.java