Created
August 28, 2012 10:26
-
-
Save thmarx/3496991 to your computer and use it in GitHub Desktop.
Async javascript method in vertx
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
load('vertx.js') | |
// defining a function | |
var async_function = function(val, callback){ | |
vertx.runOnLoop(function(){ | |
callback(val); | |
}); | |
}; | |
// using the function | |
async_function(true, function(val){ | |
stdout.println("callback: " + val); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment