private void startProcess()

in src/main/java/com/univocity/parsers/common/processor/core/AbstractConcurrentProcessor.java [129:171]


	private void startProcess() {
		ended = false;
		rowCount = 0;

		process = executor.submit(new Callable<Void>() {

			@Override
			public Void call() {
				while (outputQueue == null && !ended) {
					Thread.yield();
				}

				while (!ended) {
					rowCount++;


					processor.rowProcessed(outputQueue.row, outputQueue.context);
					while (outputQueue.next == null) {
						if (ended && outputQueue.next == null) {
							return null;
						}
						Thread.yield();
					}
					outputQueue = outputQueue.next;
					output++;
					if (limit > 1) {
						synchronized (lock) {
							lock.notify();
						}
					}
				}

				while (outputQueue != null) {
					rowCount++;
					processor.rowProcessed(outputQueue.row, outputQueue.context);
					outputQueue = outputQueue.next;
				}

				return null;
			}

		});
	}