My client makes a call to the server.
Meteor.call('someRequest', params, onAllDoneCallback);
which is being processed (server code)
Meteor.methods({
'someRequest': function(params, cb) {
anAsyncFunction(params, cb);
return true;
},
});
I would like to onAllDoneCallbackstart on the client side after completion anAsyncFunctionand launch my own callback.
However, in Meteor it seems that the second argument is someRequestignored and that it onAllDoneCallbackstarts with the return someRequest, which is here trueand which is called before it anAsyncFunctionhas finished.
In my case, I'm more concerned about the synchronization problem (I use it to tell the client that the processing is complete, and not just that the request is well received), but others will probably want to call a callback with arguments from anAsyncFunction