lib/core/utils/queue.js
function(fn) {
				if (typeof fn === 'object' && fn.then && fn.catch) {
					var defer = fn;
					fn = function(resolve, reject) {
						defer.then(resolve).catch(reject);
					};
				}
				funcGuard(fn);
				if (err !== undefined) {
					return;
				} else if (complete) {
					throw new Error('Queue already completed');
				}

				tasks.push(fn);
				++remaining;
				pop();
				return q;
			}
function(fn) {
				if (typeof fn === 'object' && fn.then && fn.catch) {
					var defer = fn;
					fn = function(resolve, reject) {
						defer.then(resolve).catch(reject);
					};
				}
				funcGuard(fn);
				if (err !== undefined) {
					return;
				} else if (complete) {
					throw new Error('Queue already completed');
				}

				tasks.push(fn);
				++remaining;
				pop();
				return q;
			}
function ( fn ) { if ( typeof fn === 'object' && fn . then && fn . catch ) { var defer = fn ; fn = function ( resolve , reject ) { defer . then ( resolve ) . catch ( reject ) ; } ; } funcGuard ( fn ) ; if ( err !== undefined ) { return ; } else if ( complete ) { throw new Error ( 'Queue already completed' ) ; } tasks . push ( fn ) ; ++ remaining ; pop ( ) ; return q ; }
Defer a function that may or may not run asynchronously.

First parameter should be the function to execute with subsequent
parameters being passed as arguments to that function
Defer a function that may or may not run asynchronously .