code: 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();
  		}
  	}
  }
docs: Dispatch work items on free workers