Skip to content

Instantly share code, notes, and snippets.

@thmarx
Created August 28, 2012 10:26
Show Gist options
  • Save thmarx/3496991 to your computer and use it in GitHub Desktop.
Save thmarx/3496991 to your computer and use it in GitHub Desktop.
Async javascript method in vertx
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