private void performMapWork() {
		while (unperformedMaps.size() > 0 || (avaliableMapWorkers.size() < numMapWorkers)) {
			if (avaliableMapWorkers.size() > 0 && unperformedMaps.size() > 0) {
				MapWorkCommunicator nextWorker = avaliableMapWorkers.poll();
				InputTracker nextMap = unperformedMaps.poll();
				if (nextMap.isEligibleWorker(nextWorker)) {
					nextMap.workAttempted();
					//Make sure we have this work on record so we can re-commission it if need be.
					sentOutMapWork[nextWorker.getID()] = nextMap;
					nextWorker.sendWork(configPath, nextMap, mapWorkIndex);
					mapWorkIndex += 1;
				}
				else {
					//Ineligible worker.
					unperformedMaps.add(0, nextMap);
					avaliableMapWorkers.add(nextWorker);
				}
			}
		}
		for (MapWorkCommunicator mwc: allMapWorkers) {
			if (mwc != null) mwc.closeSocket();
		}
	}