index.js
function deferAdd(id, task, parentChain) {
	var self = this;
	parentChain.waitingOn = (parentChain.waitingOn || 0) + 1;

	if (! parentChain.waitingOnIds)
		parentChain.waitingOnIds = [];
	parentChain.waitingOnIds.push(id);

	self._deferred.push({
		id: id || null,
		prereq: parentChain.prereq || [],
		payload: function(next) {
			self._context._id = id;

			run(self._options.context, task, function(err, value) { // Glue callback function to first arg
				if (id) self._context[id] = value;

				self._deferredRunning--;

				if (--parentChain.waitingOn == 0) {
					parentChain.completed = true;

					if (self._struct.length && self._struct[self._structPointer].type == 'await') self._execute(err);
				}

				self._execute(err);
			}, (parentChain.prereq || []).map(function(pre) {
				return self._context[pre];
			}));
		}
	});
}
function deferAdd(id, task, parentChain) {
	var self = this;
	parentChain.waitingOn = (parentChain.waitingOn || 0) + 1;

	if (! parentChain.waitingOnIds)
		parentChain.waitingOnIds = [];
	parentChain.waitingOnIds.push(id);

	self._deferred.push({
		id: id || null,
		prereq: parentChain.prereq || [],
		payload: function(next) {
			self._context._id = id;

			run(self._options.context, task, function(err, value) { // Glue callback function to first arg
				if (id) self._context[id] = value;

				self._deferredRunning--;

				if (--parentChain.waitingOn == 0) {
					parentChain.completed = true;

					if (self._struct.length && self._struct[self._structPointer].type == 'await') self._execute(err);
				}

				self._execute(err);
			}, (parentChain.prereq || []).map(function(pre) {
				return self._context[pre];
			}));
		}
	});
}
function deferAdd ( id , task , parentChain ) { var self = this ; parentChain . waitingOn = ( parentChain . waitingOn || 0 ) + 1 ; if ( ! parentChain . waitingOnIds ) parentChain . waitingOnIds = [ ] ; parentChain . waitingOnIds . push ( id ) ; self . _deferred . push ( { id : id || null , prereq : parentChain . prereq || [ ] , payload : function ( next ) { self . _context . _id = id ; run ( self . _options . context , task , function ( err , value ) { // Glue callback function to first arg if ( id ) self . _context [ id ] = value ; self . _deferredRunning -- ; if ( -- parentChain . waitingOn == 0 ) { parentChain . completed = true ; if ( self . _struct . length && self . _struct [ self . _structPointer ] . type == 'await' ) self . _execute ( err ) ; } self . _execute ( err ) ; } , ( parentChain . prereq || [ ] ) . map ( function ( pre ) { return self . _context [ pre ] ; } ) ) ; } } ) ; }
Collection of items that have been deferred
@type {array} {payload: function, id: null|String, prereq: [dep1, dep2...]}
@access private
Collection of items that have been deferred