lib/pararr.js
function dispatchWorkItems() {
	var i,
		workItem;
	if (!buffer.isEmpty()) {
		i = workerJobCount.indexOf(0);
		if(i >= 0) { //Free worker found
			workItem = buffer.next();

			// Send task to worker
			workerExec(i, workItem);

			//Check for more free workers
			dispatchWorkItems();
		}
	}
}
function dispatchWorkItems() {
	var i,
		workItem;
	if (!buffer.isEmpty()) {
		i = workerJobCount.indexOf(0);
		if(i >= 0) { //Free worker found
			workItem = buffer.next();

			// Send task to worker
			workerExec(i, workItem);

			//Check for more free workers
			dispatchWorkItems();
		}
	}
}
function dispatchWorkItems ( ) { var i , workItem ; if ( ! buffer . isEmpty ( ) ) { i = workerJobCount . indexOf ( 0 ) ; if ( i >= 0 ) { //Free worker found workItem = buffer . next ( ) ; // Send task to worker workerExec ( i , workItem ) ; //Check for more free workers dispatchWorkItems ( ) ; } } }
Dispatch work items on free workers
Dispatch work items on free workers