Created
December 17, 2009 00:27
-
-
Save cloudhead/258373 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var sys = require('sys'); | |
process.delay = function (fun) { | |
return setTimeout(fun, 0); | |
}; | |
var func = function () { | |
var promise = new process.Promise(); | |
process.delay(function () { | |
promise.emitSuccess("boo"); | |
}); | |
return promise; | |
} | |
func().addCallback(function (msg) { | |
sys.puts(msg + "!"); | |
}); | |
// boo! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment