lib/template.js
function(Context,localObj,callback,tempColl){
	var buffer = this._master && Context.bufferMode,
		i,l;
	if(Context.onRender && this._master){
		i = localObj.startFrom;
		l = this._executionLength;
		while(i < l ){
			if(typeof localObj.status[i] === "undefined") break;
			if(localObj.status[i] === "done"){
				tempColl.push(localObj.collected[i]);
			}
			else{
				break;
			}
			i++;
		}
		tempColl = buffer && this._master ? new Buffer(tempColl.join('')) : tempColl.join('');
		if(this._master) Context.onRender(tempColl,Context);
		localObj.startFrom = i;
	}
	//finish up.
	if(localObj.threads.length === 0 || Context.exitNow){
		tempColl = buffer && this._master ? new Buffer(localObj.collected.join('')) : localObj.collected.join('');
		if(this._master){
			if(Context.onRenderAll) Context.onRenderAll(tempColl,Context);
			Context.onFinish(Date.now() - Context.time,Context);
		}
		else{
			if(typeof callback === "function"){
				callback(tempColl);
			}
			else{
				if(this._executeOnce){
					Context._metaSkip[this._metaKey] = true;
					Context.setObject(this, this._metaKey,tempColl)
				}
				return tempColl;
			}
		}
	}
}
function(Context,localObj,callback,tempColl){
	var buffer = this._master && Context.bufferMode,
		i,l;
	if(Context.onRender && this._master){
		i = localObj.startFrom;
		l = this._executionLength;
		while(i < l ){
			if(typeof localObj.status[i] === "undefined") break;
			if(localObj.status[i] === "done"){
				tempColl.push(localObj.collected[i]);
			}
			else{
				break;
			}
			i++;
		}
		tempColl = buffer && this._master ? new Buffer(tempColl.join('')) : tempColl.join('');
		if(this._master) Context.onRender(tempColl,Context);
		localObj.startFrom = i;
	}
	//finish up.
	if(localObj.threads.length === 0 || Context.exitNow){
		tempColl = buffer && this._master ? new Buffer(localObj.collected.join('')) : localObj.collected.join('');
		if(this._master){
			if(Context.onRenderAll) Context.onRenderAll(tempColl,Context);
			Context.onFinish(Date.now() - Context.time,Context);
		}
		else{
			if(typeof callback === "function"){
				callback(tempColl);
			}
			else{
				if(this._executeOnce){
					Context._metaSkip[this._metaKey] = true;
					Context.setObject(this, this._metaKey,tempColl)
				}
				return tempColl;
			}
		}
	}
}
function ( Context , localObj , callback , tempColl ) { var buffer = this . _master && Context . bufferMode , i , l ; if ( Context . onRender && this . _master ) { i = localObj . startFrom ; l = this . _executionLength ; while ( i < l ) { if ( typeof localObj . status [ i ] === "undefined" ) break ; if ( localObj . status [ i ] === "done" ) { tempColl . push ( localObj . collected [ i ] ) ; } else { break ; } i ++ ; } tempColl = buffer && this . _master ? new Buffer ( tempColl . join ( '' ) ) : tempColl . join ( '' ) ; if ( this . _master ) Context . onRender ( tempColl , Context ) ; localObj . startFrom = i ; } //finish up. if ( localObj . threads . length === 0 || Context . exitNow ) { tempColl = buffer && this . _master ? new Buffer ( localObj . collected . join ( '' ) ) : localObj . collected . join ( '' ) ; if ( this . _master ) { if ( Context . onRenderAll ) Context . onRenderAll ( tempColl , Context ) ; Context . onFinish ( Date . now ( ) - Context . time , Context ) ; } else { if ( typeof callback === "function" ) { callback ( tempColl ) ; } else { if ( this . _executeOnce ) { Context . _metaSkip [ this . _metaKey ] = true ; Context . setObject ( this , this . _metaKey , tempColl ) } return tempColl ; } } } }
--Noodles.Template--
name:finish - private method
description: finish up everything
-- Noodles . Template -- name : finish - private method description : finish up everything