r.js
function makeArgCallback(manager, i) {
            return function (value) {
                //Only do the work if it has not been done
                //already for a dependency. Cycle breaking
                //logic in forceExec could mean this function
                //is called more than once for a given dependency.
                if (!manager.depDone[i]) {
                    manager.depDone[i] = true;
                    manager.deps[i] = value;
                    manager.depCount -= 1;
                    if (!manager.depCount) {
                        //All done, execute!
                        execManager(manager);
                    }
                }
            };
        }
function makeArgCallback(manager, i) {
            return function (value) {
                //Only do the work if it has not been done
                //already for a dependency. Cycle breaking
                //logic in forceExec could mean this function
                //is called more than once for a given dependency.
                if (!manager.depDone[i]) {
                    manager.depDone[i] = true;
                    manager.deps[i] = value;
                    manager.depCount -= 1;
                    if (!manager.depCount) {
                        //All done, execute!
                        execManager(manager);
                    }
                }
            };
        }
function makeArgCallback ( manager , i ) { return function ( value ) { //Only do the work if it has not been done //already for a dependency. Cycle breaking //logic in forceExec could mean this function //is called more than once for a given dependency. if ( ! manager . depDone [ i ] ) { manager . depDone [ i ] = true ; manager . deps [ i ] = value ; manager . depCount -= 1 ; if ( ! manager . depCount ) { //All done, execute! execManager ( manager ) ; } } } ; }
Helper that creates a callack function that is called when a dependency
is ready, and sets the i-th dependency for the manager as the
value passed to the callback generated by this function.
Helper that creates a callack function that is called when a dependency is ready and sets the i - th dependency for the manager as the value passed to the callback generated by this function .