lib/pararr.js
function handleArrayResult(m, workerIdx) {
	var job = jobs[m.context.jobID],
		partition = m.context.partition,
		subResult = m.result,
		result = [],
		i;
	
	job.result[partition] = subResult;

	// Increase callback count.
	job.cbCount++;
	
	// When all workers are finished return result
	if(job.cbCount === workers.length) {
		for (i = 0; i < job.result.length; i++) {
			result = result.concat(job.result[i]);
		};
		
		// Cle
		job.cb(null, result);
	}

	// Worker is finished.
	workerJobCount[workerIdx]--;
	dispatchWorkItems();
}
function handleArrayResult(m, workerIdx) {
	var job = jobs[m.context.jobID],
		partition = m.context.partition,
		subResult = m.result,
		result = [],
		i;
	
	job.result[partition] = subResult;

	// Increase callback count.
	job.cbCount++;
	
	// When all workers are finished return result
	if(job.cbCount === workers.length) {
		for (i = 0; i < job.result.length; i++) {
			result = result.concat(job.result[i]);
		};
		
		// Cle
		job.cb(null, result);
	}

	// Worker is finished.
	workerJobCount[workerIdx]--;
	dispatchWorkItems();
}
function handleArrayResult ( m , workerIdx ) { var job = jobs [ m . context . jobID ] , partition = m . context . partition , subResult = m . result , result = [ ] , i ; job . result [ partition ] = subResult ; // Increase callback count. job . cbCount ++ ; // When all workers are finished return result if ( job . cbCount === workers . length ) { for ( i = 0 ; i < job . result . length ; i ++ ) { result = result . concat ( job . result [ i ] ) ; } ; // Cle job . cb ( null , result ) ; } // Worker is finished. workerJobCount [ workerIdx ] -- ; dispatchWorkItems ( ) ; }
Handles results from parallel array operations
Handles results from parallel array operations