lib/sync.js
function (callbackError, callbackResult, otherArgs) {
        // forbid to call twice
        if (syncCallback.called) return;
        syncCallback.called = true;
        
        if (callbackError) {
            err = callbackError;
        }
        else if (otherArgs) {
            // Support multiple callback result values
            result = [];
            for (var i = 1, l = arguments.length; i < l; i++) {
                result.push(arguments[i]);
            }
        }
        else {
            result = callbackResult;
        }
        
        // Resume fiber if yielding
        if (yielded) fiber.run();
    }
function (callbackError, callbackResult, otherArgs) {
        // forbid to call twice
        if (syncCallback.called) return;
        syncCallback.called = true;
        
        if (callbackError) {
            err = callbackError;
        }
        else if (otherArgs) {
            // Support multiple callback result values
            result = [];
            for (var i = 1, l = arguments.length; i < l; i++) {
                result.push(arguments[i]);
            }
        }
        else {
            result = callbackResult;
        }
        
        // Resume fiber if yielding
        if (yielded) fiber.run();
    }
function ( callbackError , callbackResult , otherArgs ) { // forbid to call twice if ( syncCallback . called ) return ; syncCallback . called = true ; if ( callbackError ) { err = callbackError ; } else if ( otherArgs ) { // Support multiple callback result values result = [ ] ; for ( var i = 1 , l = arguments . length ; i < l ; i ++ ) { result . push ( arguments [ i ] ) ; } } else { result = callbackResult ; } // Resume fiber if yielding if ( yielded ) fiber . run ( ) ; }
Create virtual callback
Create virtual callback