-
-
Save isaacs/241672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function acquireaDependency () { | |
acquire('aDependency').addCallback(function(){ | |
p.emitSuccess() | |
}); | |
return p; | |
}; | |
function acquireanotherDependency () { | |
var p = new Promise; | |
acquireaDependency().addCallback(function () { | |
acquire("anotherDependency").addCallback(function () { | |
p.emitSuccess(); | |
}); | |
}); | |
return p; | |
}; | |
function acquirethirdDependency () { | |
var p = new Promise; | |
acquireanotherDependency().addCallback(function () { | |
acquire("thirdDependency").addCallback(function () { | |
p.emitSuccess(); | |
}); | |
}); | |
return p | |
}; | |
function acquirefourthDependency () { | |
var p = new Promise; | |
acquire('fourthDependency').addCallback(function(){ | |
acquirethirdDependency().addCallback(function () { | |
p.emitSuccess(); | |
}); | |
}); | |
return p; | |
}; | |
function doMyShiz () { | |
// do Something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment