I've tried to research on how exactly asynchronous functions should be written. After a lot of plowing through a lot of documentation, it's still unclear to me.
How do I write asynchronous functions for Node? How should I implement error event handling correctly?
Another way to ask my question would be this: How should I interpret the following function?
var async_function = function(val, callback){
process.nextTick(function(){
callback(val);
});
};
Also, I found this question on SO ("How do I create a non-blocking asynchronous function in node.js?") interesting. I don't feel like it has been answered yet.