title: How to call async method from Meteor own callbacks?
body: <p>I've just spent a few hours reading SO with answers such as <a href="https://stackoverflow.com/questions/12569712/meteor-calling-an-asynchronous-function-inside-a-meteor-method-and-returning-th">Meteor: Calling an asynchronous function inside a Meteor.method and returning the result</a></p>
  
  <p>Unfortunately, I still didn't manage to user fibers, or futures for that matter. </p>
  
  <p>I'm trying to do something fairly simple (I think!).</p>
  
  <p>When creating a user, add a variable to the user object, based on the result of an asynchronous method. So imagine if you will my async method is called on a 3rd party db server called BANK, which could take several seconds to return. </p>
  
  <pre><code>Accounts.onCreateUser(function(options,user){
  
  var Fiber = Npm.require("fibers");
  
  Fiber(function() { 
      BANK.getBalance(function(err, theBalance) {
  
          if (err) return console.log(err);
  
          _.extend(user,{
              balance: theBalance;
          });
  
      });
  }).run();
  
  return user;
  </code></pre>
  
  <p>});</p>
  
  <p>So what happens in the above is that the BANK method is called, but by the time it returns the code has already moved on and _.extend is never invoked. </p>
  
  <p>I tried placing the return call inside the Fiber, that only made things worse: it never return user. Well it did, but 3 seconds too late so by then everything downstream was bailing out.</p>
  
  <p>Thank you for any help!</p>